Add game direct load support for new UI
This commit is contained in:
parent
5a384a51ce
commit
e0d68e4768
4 changed files with 14 additions and 7 deletions
|
@ -54,6 +54,7 @@ void Config::Load(const char *iniFileName)
|
|||
general->Get("AutoLoadLast", &bAutoLoadLast, false);
|
||||
general->Get("AutoRun", &bAutoRun, true);
|
||||
general->Get("Browse", &bBrowse, false);
|
||||
general->Get("DirectLoad", &bDirectLoad, false);
|
||||
general->Get("ConfirmOnQuit", &bConfirmOnQuit, false);
|
||||
general->Get("IgnoreBadMemAccess", &bIgnoreBadMemAccess, true);
|
||||
general->Get("CurrentDirectory", ¤tDirectory, "");
|
||||
|
@ -201,6 +202,7 @@ void Config::Save()
|
|||
general->Set("AutoLoadLast", bAutoLoadLast);
|
||||
general->Set("AutoRun", bAutoRun);
|
||||
general->Set("Browse", bBrowse);
|
||||
general->Set("DirectLoad", bDirectLoad);
|
||||
general->Set("ConfirmOnQuit", bConfirmOnQuit);
|
||||
general->Set("IgnoreBadMemAccess", bIgnoreBadMemAccess);
|
||||
general->Set("CurrentDirectory", currentDirectory);
|
||||
|
|
|
@ -33,7 +33,6 @@ public:
|
|||
|
||||
// Whether to save the config on close.
|
||||
bool bSaveSettings;
|
||||
|
||||
bool bFirstRun;
|
||||
|
||||
// These are broken
|
||||
|
@ -47,10 +46,11 @@ public:
|
|||
#endif
|
||||
|
||||
// General
|
||||
bool bNewUI; // "Hidden" setting, does not get saved to ini file.
|
||||
bool bNewUI;
|
||||
int iNumWorkerThreads;
|
||||
bool bScreenshotsAsPNG;
|
||||
bool bEnableLogging;
|
||||
bool bDirectLoad;
|
||||
|
||||
// Core
|
||||
bool bIgnoreBadMemAccess;
|
||||
|
@ -77,7 +77,7 @@ public:
|
|||
int iWindowX;
|
||||
int iWindowY;
|
||||
int iWindowZoom; // for Windows
|
||||
bool bAntiAliasing; // for Windows, too
|
||||
bool bAntiAliasing;
|
||||
bool bVertexCache;
|
||||
bool bFullScreen;
|
||||
#ifdef _WIN32
|
||||
|
|
|
@ -181,10 +181,9 @@ void GameSettingsScreen::CreateViews() {
|
|||
root_->Add(leftColumn);
|
||||
|
||||
leftColumn->Add(new Spacer(new LinearLayoutParams(1.0)));
|
||||
leftColumn->Add(new Choice(g->T("Back"), "", false, new AnchorLayoutParams(150, WRAP_CONTENT, 10, NONE, NONE, 10)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
leftColumn->Add(new Choice(g->T("Back"), "", false, new AnchorLayoutParams(205, WRAP_CONTENT, 30, NONE, NONE, 10)))->OnClick.Handle<UIScreen>(this, &UIScreen::OnBack);
|
||||
|
||||
|
||||
TabHolder *tabHolder = new TabHolder(ORIENT_VERTICAL, 200, new LinearLayoutParams(800, FILL_PARENT, actionMenuMargins));
|
||||
TabHolder *tabHolder = new TabHolder(ORIENT_VERTICAL, 200, new LinearLayoutParams(910, FILL_PARENT, actionMenuMargins));
|
||||
|
||||
root_->Add(tabHolder);
|
||||
|
||||
|
|
|
@ -409,7 +409,13 @@ UI::EventReturn MainScreen::OnLoadFile(UI::EventParams &e) {
|
|||
}
|
||||
|
||||
UI::EventReturn MainScreen::OnGameSelected(UI::EventParams &e) {
|
||||
if(g_Config.bDirectLoad) {
|
||||
// Go directly into the game.
|
||||
screenManager()->switchScreen(new EmuScreen(e.s));
|
||||
} else {
|
||||
// Goto Game Menu.
|
||||
screenManager()->push(new GameScreen(e.s));
|
||||
}
|
||||
return UI::EVENT_DONE;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue