mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-10-08 11:33:28 +00:00
Win32: Implement "-d" command-line switch. It didn't do anything, previously.
Also added a helper func to set all log levels at once. Should be handy if we clean up the logging channels screen.
This commit is contained in:
parent
e6b2c66640
commit
3259b61cf2
@ -127,6 +127,12 @@ public:
|
||||
log_[type]->SetLevel(level);
|
||||
}
|
||||
|
||||
void SetAllLogLevels(LogTypes::LOG_LEVELS level) {
|
||||
for (int i = 0; i < LogTypes::NUMBER_OF_LOGS; ++i) {
|
||||
log_[i]->SetLevel(level);
|
||||
}
|
||||
}
|
||||
|
||||
void SetEnable(LogTypes::LOG_TYPE type, bool enable) {
|
||||
log_[type]->SetEnable(enable);
|
||||
}
|
||||
|
@ -310,6 +310,8 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
g_Config.SetDefaultPath(GetSysDirectory(DIRECTORY_SYSTEM));
|
||||
g_Config.Load(configFilename, controlsConfigFilename);
|
||||
|
||||
bool debugLogLevel = false;
|
||||
|
||||
// The rest is handled in NativeInit().
|
||||
for (int i = 1; i < __argc; ++i)
|
||||
{
|
||||
@ -328,6 +330,9 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
g_Config.bAutoRun = false;
|
||||
g_Config.bSaveSettings = false;
|
||||
break;
|
||||
case 'd':
|
||||
debugLogLevel = true;
|
||||
break;
|
||||
}
|
||||
|
||||
if (!strncmp(__argv[i], "--fullscreen", strlen("--fullscreen")))
|
||||
@ -351,7 +356,9 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
// - The -l switch is expected to show the log console, REGARDLESS of config settings.
|
||||
// - It should be possible to log to a file without showing the console.
|
||||
LogManager::GetInstance()->GetConsoleListener()->Init(showLog, 150, 120, "PPSSPP Debug Console");
|
||||
|
||||
|
||||
if (debugLogLevel)
|
||||
LogManager::GetInstance()->SetAllLogLevels(LogTypes::LDEBUG);
|
||||
|
||||
//Windows, API init stuff
|
||||
INITCOMMONCONTROLSEX comm;
|
||||
|
Loading…
Reference in New Issue
Block a user