mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-21 18:29:05 +02:00
Add a command line option to load a state.
For debugging.
This commit is contained in:
1 parent
f9133c1a56
commit
14ef840dd3
2 files changed
+15
-1
No files matched your search
@@ -21,6 +21,7 @@
|
||||
#include "file/zip_read.h"
|
||||
|
||||
#include "../Core/Config.h"
|
||||
#include "../Core/SaveState.h"
|
||||
#include "EmuThread.h"
|
||||
|
||||
#include "LogManager.h"
|
||||
@@ -53,6 +54,7 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
|
||||
const char *fileToStart = NULL;
|
||||
const char *fileToLog = NULL;
|
||||
const char *stateToLoad = NULL;
|
||||
bool hideLog = true;
|
||||
bool autoRun = true;
|
||||
|
||||
@@ -93,6 +95,10 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
fileToLog = __argv[++i];
|
||||
if (!strncmp(__argv[i], "--log=", strlen("--log=")) && strlen(__argv[i]) > strlen("--log="))
|
||||
fileToLog = __argv[i] + strlen("--log=");
|
||||
if (!strcmp(__argv[i], "--state") && i < __argc - 1)
|
||||
stateToLoad = __argv[++i];
|
||||
if (!strncmp(__argv[i], "--state=", strlen("--state=")) && strlen(__argv[i]) > strlen("--state="))
|
||||
stateToLoad = __argv[i] + strlen("--state=");
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -158,6 +164,8 @@ int WINAPI WinMain(HINSTANCE _hInstance, HINSTANCE hPrevInstance, LPSTR szCmdLin
|
||||
|
||||
if (autoRun)
|
||||
MainWindow::SetNextState(CORE_RUNNING);
|
||||
if (fileToStart != NULL && stateToLoad != NULL)
|
||||
SaveState::Load(stateToLoad);
|
||||
|
||||
//so.. we're at the message pump of the GUI thread
|
||||
MSG msg;
|
||||
|
||||
Reference in new issue
Block a user