Win32 - fix NDS_UnPause to not attempt to unpause if no ROM is loaded (causes a rom to try to be loaded and errors). NDS_Pause and NDS_UnPause only respond if paused = false or true respectively. Minor fix to Drag and Drop
This commit is contained in:
parent
b187f8d164
commit
b5cd79371b
|
@ -989,19 +989,25 @@ DWORD WINAPI run()
|
|||
|
||||
void NDS_Pause()
|
||||
{
|
||||
execute = FALSE;
|
||||
paused = TRUE;
|
||||
SPU_Pause(1);
|
||||
while (!paused) {}
|
||||
printlog("Paused\n");
|
||||
if (!paused)
|
||||
{
|
||||
execute = FALSE;
|
||||
paused = TRUE;
|
||||
SPU_Pause(1);
|
||||
while (!paused) {}
|
||||
printlog("Paused\n");
|
||||
}
|
||||
}
|
||||
|
||||
void NDS_UnPause()
|
||||
{
|
||||
paused = FALSE;
|
||||
execute = TRUE;
|
||||
SPU_Pause(0);
|
||||
printlog("Unpaused\n");
|
||||
if (romloaded && paused)
|
||||
{
|
||||
paused = FALSE;
|
||||
execute = TRUE;
|
||||
SPU_Pause(0);
|
||||
printlog("Unpaused\n");
|
||||
}
|
||||
}
|
||||
|
||||
void StateSaveSlot(int num)
|
||||
|
@ -1693,8 +1699,8 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
|
|||
EnableMenuItem(menu, IDM_GAME_INFO, MF_ENABLED);
|
||||
EnableMenuItem(menu, IDM_IMPORTBACKUPMEMORY, MF_ENABLED);
|
||||
romloaded = TRUE;
|
||||
NDS_UnPause();
|
||||
}
|
||||
NDS_UnPause();
|
||||
}
|
||||
return 0;
|
||||
case WM_MOUSEMOVE:
|
||||
|
|
Loading…
Reference in New Issue