-cleaned up startup code for main menu.

-fixed spelling mistakes in menu_cftheme.
This commit is contained in:
fledge68 2012-08-06 16:46:16 +00:00
parent 1d6b882f0d
commit c5a19ee450
3 changed files with 21 additions and 32 deletions

View File

@ -608,10 +608,6 @@ void CMenu::_loadCFCfg(SThemeData &theme)
m_cf.setFont(_font(theme.fontSet, domain, "font", TITLEFONT), m_theme.getColor(domain, "font_color", CColor(0xFFFFFFFF)));
// Coverflow Count
m_numCFVersions = min(max(2, m_theme.getInt("_COVERFLOW", "number_of_modes", 2)), 15);
for (u32 i = 1; i <= m_numCFVersions; ++i)
_loadCFLayout(i);
_loadCFLayout(m_cfg.getInt(_domainFromView(), "last_cf_mode" , 1));
}
Vector3D CMenu::_getCFV3D(const string &domain, const string &key, const Vector3D &def, bool otherScrnFmt)

View File

@ -328,7 +328,7 @@ void CMenu::_cfTheme(void)
{
m_theme.clear();
m_theme.unload();
m_theme.load(fmt("%s/%s.ini", m_themeDir.c_str(), m_cfg.getString("GENERAL", "theme", "defaut").c_str()));
m_theme.load(fmt("%s/%s.ini", m_themeDir.c_str(), m_cfg.getString("GENERAL", "theme", "default").c_str()));
break;
}
else if (BTN_UP_PRESSED)
@ -409,7 +409,7 @@ void CMenu::_cfTheme(void)
{
m_theme.clear();
m_theme.unload();
m_theme.load(fmt("%s/%s.ini", m_themeDir.c_str(), m_cfg.getString("GENERAL", "theme", "defaut").c_str()));
m_theme.load(fmt("%s/%s.ini", m_themeDir.c_str(), m_cfg.getString("GENERAL", "theme", "default").c_str()));
break;
}
else if (m_btnMgr.selected(m_cfThemeBtnAlt))

View File

@ -191,6 +191,7 @@ void CMenu::LoadView(void)
_hideMain(true);
m_cf.clear();
if(!m_vid.showingWaitMessage())
_showWaitMessage();
_loadList();
@ -253,16 +254,13 @@ int CMenu::main(void)
{
wstringEx curLetter;
string prevTheme = m_cfg.getString("GENERAL", "theme", "default");
bool use_grab = m_cfg.getBool("GENERAL", "use_grab", false);
parental_homebrew = m_cfg.getBool("HOMEBREW", "parental", false);
show_homebrew = !m_cfg.getBool("HOMEBREW", "disable", false);
show_channel = !m_cfg.getBool("GENERAL", "hidechannel", false);
show_emu = !m_cfg.getBool("EMULATOR", "disable", false);
bool dpad_mode = m_cfg.getBool("GENERAL", "dpad_mode", false);
bool b_lr_mode = m_cfg.getBool("GENERAL", "b_lr_mode", false);
parental_homebrew = m_cfg.getBool("HOMEBREW", "parental", false);
if(m_Emulator_boot)
m_current_view = COVERFLOW_EMU;
bool use_grab = m_cfg.getBool("GENERAL", "use_grab", false);
m_reload = false;
static u32 disc_check = 0;
@ -282,27 +280,23 @@ int CMenu::main(void)
m_GameTDBLoaded=true;
m_gametdb.CloseFile();
}
if (m_cfg.getBool("GENERAL", "startup_menu", false))
{
m_vid.hideWaitMessage();
_Source();
}
if(m_Emulator_boot)
m_current_view = COVERFLOW_EMU;
if (m_cfg.getBool("GENERAL", "update_cache", false))
{
UpdateCache();
m_gameList.Update();
}
_loadList();
if(m_Emulator_boot)
LoadView();
if (m_cfg.getBool("GENERAL", "startup_menu", false))
{
_loadCFLayout(m_cfg.getInt(_domainFromView(), "last_cf_mode", 1));
m_cf.applySettings();
}
_hideMain();
if(!_Source())
LoadView();
else
_showMain();
m_vid.CheckWaitThread(true);
m_curGameId.clear();
_initCF();
}
lwp_t coverStatus = LWP_THREAD_NULL;
unsigned int stack_size = (unsigned int)32768;
@ -401,7 +395,7 @@ int CMenu::main(void)
{
_hideMain();
_config(1);
if(prevTheme != m_cfg.getString("GENERAL", "theme") || m_reload == true)
if(prevTheme != m_cfg.getString("GENERAL", "theme"))
{
m_reload = true;
break;
@ -412,8 +406,6 @@ int CMenu::main(void)
{
_hideMain();
_about();
if(m_exit)
break;
_showMain();
}
else if(m_btnMgr.selected(m_mainBtnDVD))
@ -708,7 +700,6 @@ int CMenu::main(void)
_hideMain();
_CategorySettings();
_showMain();
m_curGameId = m_cf.getId();
_initCF();
}
if(use_grab)
@ -829,10 +820,12 @@ int CMenu::main(void)
m_cf.mouse(m_vid, chan, -1, -1);
}
}
if(m_reload)
_showWaitMessage();
gprintf("Saving configuration files\n");
m_cfg.save();
m_cat.save();
m_cat.unload();
// m_loc.save();
gprintf("Wait for dvd\n");
LWP_JoinThread(coverStatus, NULL);