mirror of
https://github.com/hrydgard/ppsspp.git
synced 2024-11-27 07:20:49 +00:00
Pause before browsing for a state file on Windows.
This commit is contained in:
parent
589916fca2
commit
020f69e5fb
@ -313,6 +313,13 @@ namespace MainWindow
|
||||
break;
|
||||
|
||||
case ID_FILE_LOADSTATE:
|
||||
if (g_State.bEmuThreadStarted)
|
||||
{
|
||||
nextState = Core_IsStepping() ? CORE_STEPPING : CORE_RUNNING;
|
||||
for (int i=0; i<numCPUs; i++)
|
||||
if (disasmWindow[i])
|
||||
SendMessage(disasmWindow[i]->GetDlgHandle(), WM_COMMAND, IDC_STOP, 0);
|
||||
}
|
||||
if (W32Util::BrowseForFileName(true, hWnd, "Load state",0,"Save States (*.ppst)\0*.ppst\0All files\0*.*\0\0","ppst",fn))
|
||||
{
|
||||
SetCursor(LoadCursor(0,IDC_WAIT));
|
||||
@ -321,6 +328,13 @@ namespace MainWindow
|
||||
break;
|
||||
|
||||
case ID_FILE_SAVESTATE:
|
||||
if (g_State.bEmuThreadStarted)
|
||||
{
|
||||
nextState = Core_IsStepping() ? CORE_STEPPING : CORE_RUNNING;
|
||||
for (int i=0; i<numCPUs; i++)
|
||||
if (disasmWindow[i])
|
||||
SendMessage(disasmWindow[i]->GetDlgHandle(), WM_COMMAND, IDC_STOP, 0);
|
||||
}
|
||||
if (W32Util::BrowseForFileName(false, hWnd, "Save state",0,"Save States (*.ppst)\0*.ppst\0All files\0*.*\0\0","ppst",fn))
|
||||
{
|
||||
SetCursor(LoadCursor(0,IDC_WAIT));
|
||||
@ -780,6 +794,13 @@ namespace MainWindow
|
||||
if (!result)
|
||||
MessageBox(0, "Savestate failure. Please try again later.", "Sorry", MB_OK);
|
||||
SetCursor(LoadCursor(0, IDC_ARROW));
|
||||
|
||||
if (g_State.bEmuThreadStarted && nextState == CORE_RUNNING)
|
||||
{
|
||||
for (int i=0; i<numCPUs; i++)
|
||||
if (disasmWindow[i])
|
||||
SendMessage(disasmWindow[i]->GetDlgHandle(), WM_COMMAND, IDC_GO, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void SetNextState(CoreState state)
|
||||
|
Loading…
Reference in New Issue
Block a user