mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-02-11 00:56:37 +00:00
Refactor Windows show log switch.
This commit is contained in:
parent
7aa7640e87
commit
ecffa492f6
@ -53,9 +53,13 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
|||||||
|
|
||||||
const char *fileToStart = NULL;
|
const char *fileToStart = NULL;
|
||||||
const char *fileToLog = NULL;
|
const char *fileToLog = NULL;
|
||||||
bool showLog = false;
|
bool hideLog = true;
|
||||||
bool autoRun = true;
|
bool autoRun = true;
|
||||||
|
|
||||||
|
#ifdef _DEBUG
|
||||||
|
hideLog = false;
|
||||||
|
#endif
|
||||||
|
|
||||||
g_Config.Load();
|
g_Config.Load();
|
||||||
VFSRegister("", new DirectoryAssetReader("assets/"));
|
VFSRegister("", new DirectoryAssetReader("assets/"));
|
||||||
VFSRegister("", new DirectoryAssetReader(""));
|
VFSRegister("", new DirectoryAssetReader(""));
|
||||||
@ -79,7 +83,7 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
|||||||
g_Config.iCpuCore = CPU_FASTINTERPRETER;
|
g_Config.iCpuCore = CPU_FASTINTERPRETER;
|
||||||
break;
|
break;
|
||||||
case 'l':
|
case 'l':
|
||||||
showLog = true;
|
hideLog = false;
|
||||||
break;
|
break;
|
||||||
case 's':
|
case 's':
|
||||||
autoRun = false;
|
autoRun = false;
|
||||||
@ -139,11 +143,7 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
|||||||
LogManager::Init();
|
LogManager::Init();
|
||||||
if (fileToLog != NULL)
|
if (fileToLog != NULL)
|
||||||
LogManager::GetInstance()->ChangeFileLog(fileToLog);
|
LogManager::GetInstance()->ChangeFileLog(fileToLog);
|
||||||
bool hidden = false;
|
LogManager::GetInstance()->GetConsoleListener()->Open(hideLog, 150, 120, "PPSSPP Debug Console");
|
||||||
#ifndef _DEBUG
|
|
||||||
hidden = true;
|
|
||||||
#endif
|
|
||||||
LogManager::GetInstance()->GetConsoleListener()->Open(hidden, 150, 120, "PPSSPP Debug Console");
|
|
||||||
LogManager::GetInstance()->SetLogLevel(LogTypes::G3D, LogTypes::LERROR);
|
LogManager::GetInstance()->SetLogLevel(LogTypes::G3D, LogTypes::LERROR);
|
||||||
if (fileToStart != NULL)
|
if (fileToStart != NULL)
|
||||||
{
|
{
|
||||||
@ -156,8 +156,6 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
|||||||
else
|
else
|
||||||
MainWindow::BrowseAndBoot();
|
MainWindow::BrowseAndBoot();
|
||||||
|
|
||||||
if (showLog)
|
|
||||||
PostMessage(hwndMain, WM_COMMAND, ID_DEBUG_LOG, 0);
|
|
||||||
if (autoRun)
|
if (autoRun)
|
||||||
MainWindow::SetNextState(CORE_RUNNING);
|
MainWindow::SetNextState(CORE_RUNNING);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user