NativeApp: Load config before processing flags (duh)
This commit is contained in:
parent
875f3569ee
commit
d56bc40db4
2 changed files with 19 additions and 9 deletions
|
@ -32,30 +32,37 @@ public:
|
||||||
CConfig();
|
CConfig();
|
||||||
~CConfig();
|
~CConfig();
|
||||||
|
|
||||||
// Many of these are currently broken.
|
// Whether to save the config on close.
|
||||||
bool bEnableSound;
|
|
||||||
bool bAutoLoadLast;
|
|
||||||
bool bSaveSettings;
|
bool bSaveSettings;
|
||||||
|
|
||||||
|
// These are broken
|
||||||
|
bool bAutoLoadLast;
|
||||||
bool bFirstRun;
|
bool bFirstRun;
|
||||||
bool bAutoRun;
|
bool bAutoRun;
|
||||||
bool bSpeedLimit;
|
bool bSpeedLimit;
|
||||||
bool bConfirmOnQuit;
|
bool bConfirmOnQuit;
|
||||||
|
|
||||||
|
// Core
|
||||||
bool bIgnoreBadMemAccess;
|
bool bIgnoreBadMemAccess;
|
||||||
bool bFastMemory;
|
bool bFastMemory;
|
||||||
|
int iCpuCore;
|
||||||
|
|
||||||
// GFX
|
// GFX
|
||||||
bool bDisplayFramebuffer;
|
bool bDisplayFramebuffer;
|
||||||
bool bHardwareTransform;
|
bool bHardwareTransform;
|
||||||
bool bBufferedRendering;
|
bool bBufferedRendering;
|
||||||
bool bDrawWireframe;
|
bool bDrawWireframe;
|
||||||
|
int iWindowZoom; // for Windows
|
||||||
|
|
||||||
|
// Sound
|
||||||
|
bool bEnableSound;
|
||||||
|
|
||||||
|
// UI
|
||||||
bool bShowTouchControls;
|
bool bShowTouchControls;
|
||||||
bool bShowDebuggerOnLoad;
|
bool bShowDebuggerOnLoad;
|
||||||
bool bShowAnalogStick;
|
bool bShowAnalogStick;
|
||||||
bool bShowFPSCounter;
|
bool bShowFPSCounter;
|
||||||
bool bShowDebugStats;
|
bool bShowDebugStats;
|
||||||
int iWindowZoom; // for Windows
|
|
||||||
int iCpuCore;
|
|
||||||
|
|
||||||
std::string currentDirectory;
|
std::string currentDirectory;
|
||||||
std::string memCardDirectory;
|
std::string memCardDirectory;
|
||||||
|
|
|
@ -169,6 +169,10 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co
|
||||||
LogManager *logman = LogManager::GetInstance();
|
LogManager *logman = LogManager::GetInstance();
|
||||||
ILOG("Logman: %p", logman);
|
ILOG("Logman: %p", logman);
|
||||||
|
|
||||||
|
config_filename = user_data_path + "ppsspp.ini";
|
||||||
|
|
||||||
|
g_Config.Load(config_filename.c_str());
|
||||||
|
|
||||||
bool gfxLog = false;
|
bool gfxLog = false;
|
||||||
// Parse command line
|
// Parse command line
|
||||||
LogTypes::LOG_LEVELS logLevel = LogTypes::LINFO;
|
LogTypes::LOG_LEVELS logLevel = LogTypes::LINFO;
|
||||||
|
@ -184,12 +188,15 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co
|
||||||
break;
|
break;
|
||||||
case 'j':
|
case 'j':
|
||||||
g_Config.iCpuCore = CPU_JIT;
|
g_Config.iCpuCore = CPU_JIT;
|
||||||
|
g_Config.bSaveSettings = false;
|
||||||
break;
|
break;
|
||||||
case 'f':
|
case 'f':
|
||||||
g_Config.iCpuCore = CPU_FASTINTERPRETER;
|
g_Config.iCpuCore = CPU_FASTINTERPRETER;
|
||||||
|
g_Config.bSaveSettings = false;
|
||||||
break;
|
break;
|
||||||
case 'i':
|
case 'i':
|
||||||
g_Config.iCpuCore = CPU_INTERPRETER;
|
g_Config.iCpuCore = CPU_INTERPRETER;
|
||||||
|
g_Config.bSaveSettings = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -207,10 +214,6 @@ void NativeInit(int argc, const char *argv[], const char *savegame_directory, co
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
config_filename = user_data_path + "ppsspp.ini";
|
|
||||||
|
|
||||||
g_Config.Load(config_filename.c_str());
|
|
||||||
|
|
||||||
if (g_Config.currentDirectory == "") {
|
if (g_Config.currentDirectory == "") {
|
||||||
#if defined(ANDROID) || defined(BLACKBERRY) || defined(__SYMBIAN32__)
|
#if defined(ANDROID) || defined(BLACKBERRY) || defined(__SYMBIAN32__)
|
||||||
g_Config.currentDirectory = external_directory;
|
g_Config.currentDirectory = external_directory;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue