diff --git a/source/menu/menu.hpp b/source/menu/menu.hpp index 4270e01d..10cdd1cc 100644 --- a/source/menu/menu.hpp +++ b/source/menu/menu.hpp @@ -700,7 +700,7 @@ private: int _config4(void); int _configAdv(void); int _configSnd(void); - void _game(bool launch = false); + void _game(bool launch = false, bool gametdb = false); void _download(std::string gameId = std::string()); bool _code(char code[4], bool erase = false); void _about(void); diff --git a/source/menu/menu_game.cpp b/source/menu/menu_game.cpp index 1fe86928..9174b9d5 100644 --- a/source/menu/menu_game.cpp +++ b/source/menu/menu_game.cpp @@ -284,7 +284,7 @@ static void setLanguage(int l) configbytes[0] = 0xCD; } -void CMenu::_game(bool launch) +void CMenu::_game(bool launch, bool gametdb) { m_gcfg1.load(sfmt("%s/gameconfig1.ini", m_settingsDir.c_str()).c_str()); if (!launch) @@ -321,7 +321,7 @@ void CMenu::_game(bool launch) m_gameSound.Stop(); break; } - else if (BTN_PLUS_PRESSED) + else if (BTN_PLUS_PRESSED && gametdb) { _hideGame(); m_gameSelected = true; diff --git a/source/menu/menu_main.cpp b/source/menu/menu_main.cpp index a8231733..2857e6e2 100644 --- a/source/menu/menu_main.cpp +++ b/source/menu/menu_main.cpp @@ -14,6 +14,7 @@ #include "disc.h" #include "loader/cios.hpp" #include "loader/alt_ios.h" +#include "GameTDB.hpp" using namespace std; @@ -189,6 +190,12 @@ int CMenu::main(void) SetupInput(); MusicPlayer::Instance()->Play(); + GameTDB m_gametdb; + m_gametdb.OpenFile(sfmt("%s/wiitdb.xml", m_settingsDir.c_str()).c_str()); + bool gametdbloaded=false; + if (m_gametdb.IsLoaded()) + gametdbloaded=true; + m_gametdb.CloseFile(); m_gameList.SetLanguage(m_loc.getString(m_curLanguage, "gametdb_code", "EN").c_str()); if (m_cfg.getBool("GENERAL", "update_cache", false)) { @@ -578,7 +585,7 @@ int CMenu::main(void) if (m_cf.select()) { _hideMain(); - _game(BTN_B_HELD); + _game(BTN_B_HELD, gametdbloaded); if(m_exit) break; m_cf.cancel(); _showMain();