win32: make printscreen save as suspend emulation
This commit is contained in:
parent
8917c70613
commit
b1bac119bb
|
@ -100,6 +100,8 @@ void HK_SearchCheats(int, bool justPressed)
|
|||
}
|
||||
void HK_QuickScreenShot(int param, bool justPressed)
|
||||
{
|
||||
bool unpause = NDS_Pause(false);
|
||||
|
||||
char buffer[MAX_PATH];
|
||||
ZeroMemory(buffer, sizeof(buffer));
|
||||
path.getpath(path.SCREENSHOTS, buffer);
|
||||
|
@ -127,9 +129,13 @@ void HK_QuickScreenShot(int param, bool justPressed)
|
|||
}
|
||||
break;
|
||||
}
|
||||
|
||||
if(unpause) NDS_UnPause(false);
|
||||
}
|
||||
void HK_PrintScreen(int param, bool justPressed)
|
||||
{
|
||||
if(!justPressed) return;
|
||||
|
||||
char outFilename[MAX_PATH];
|
||||
|
||||
OPENFILENAME ofn;
|
||||
|
|
|
@ -1978,19 +1978,20 @@ DWORD WINAPI run()
|
|||
return 1;
|
||||
}
|
||||
|
||||
void NDS_Pause(bool showMsg)
|
||||
//returns true if it just now paused
|
||||
bool NDS_Pause(bool showMsg)
|
||||
{
|
||||
if (!paused)
|
||||
{
|
||||
emu_halt();
|
||||
paused = TRUE;
|
||||
SPU_Pause(1);
|
||||
while (!paused) {}
|
||||
if (showMsg) INFO("Emulation paused\n");
|
||||
if(paused) return false;
|
||||
|
||||
SetWindowText(MainWindow->getHWnd(), "Paused");
|
||||
MainWindowToolbar->ChangeButtonBitmap(IDM_PAUSE, IDB_PLAY);
|
||||
}
|
||||
emu_halt();
|
||||
paused = TRUE;
|
||||
SPU_Pause(1);
|
||||
while (!paused) {}
|
||||
if (showMsg) INFO("Emulation paused\n");
|
||||
|
||||
SetWindowText(MainWindow->getHWnd(), "Paused");
|
||||
MainWindowToolbar->ChangeButtonBitmap(IDM_PAUSE, IDB_PLAY);
|
||||
return true;
|
||||
}
|
||||
|
||||
void NDS_UnPause(bool showMsg)
|
||||
|
|
|
@ -8,7 +8,7 @@ extern HMENU mainMenu; //Holds handle to the main DeSmuME menu
|
|||
extern CToolBar* MainWindowToolbar;
|
||||
|
||||
extern volatile bool execute, paused;
|
||||
void NDS_Pause(bool showMsg = true);
|
||||
bool NDS_Pause(bool showMsg = true);
|
||||
void NDS_UnPause(bool showMsg = true);
|
||||
void LoadSaveStateInfo();
|
||||
void Display();
|
||||
|
|
Loading…
Reference in New Issue