mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
Pause before browsing for a state file on Windows.
This commit is contained in:
parent
589916fca2
commit
020f69e5fb
1 changed files with 21 additions and 0 deletions
|
@ -313,6 +313,13 @@ namespace MainWindow
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_FILE_LOADSTATE:
|
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))
|
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));
|
SetCursor(LoadCursor(0,IDC_WAIT));
|
||||||
|
@ -321,6 +328,13 @@ namespace MainWindow
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ID_FILE_SAVESTATE:
|
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))
|
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));
|
SetCursor(LoadCursor(0,IDC_WAIT));
|
||||||
|
@ -780,6 +794,13 @@ namespace MainWindow
|
||||||
if (!result)
|
if (!result)
|
||||||
MessageBox(0, "Savestate failure. Please try again later.", "Sorry", MB_OK);
|
MessageBox(0, "Savestate failure. Please try again later.", "Sorry", MB_OK);
|
||||||
SetCursor(LoadCursor(0, IDC_ARROW));
|
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)
|
void SetNextState(CoreState state)
|
||||||
|
|
Loading…
Add table
Reference in a new issue