From 6f90eec59386793f23df0bc81141194065033f34 Mon Sep 17 00:00:00 2001 From: zeromus Date: Sun, 14 Aug 2011 18:59:53 +0000 Subject: [PATCH] win32: actually do what my last checkin said it did. but now i no longer think it was necessary, so just ignore the last two revisions --- desmume/src/windows/hotkey.cpp | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) diff --git a/desmume/src/windows/hotkey.cpp b/desmume/src/windows/hotkey.cpp index a00da4f0d..02f9dba86 100644 --- a/desmume/src/windows/hotkey.cpp +++ b/desmume/src/windows/hotkey.cpp @@ -100,8 +100,6 @@ 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); @@ -129,13 +127,14 @@ void HK_QuickScreenShot(int param, bool justPressed) } break; } - - if(unpause) NDS_UnPause(false); } + void HK_PrintScreen(int param, bool justPressed) { if(!justPressed) return; + bool unpause = NDS_Pause(false); + char outFilename[MAX_PATH]; OPENFILENAME ofn; @@ -170,14 +169,17 @@ void HK_PrintScreen(int param, bool justPressed) } strcpy(outFilename,filename.c_str()); - if(!GetSaveFileName(&ofn)) - return; - filename = outFilename; + if(GetSaveFileName(&ofn)) + { + filename = outFilename; - if(toupper(strright(filename,4)) == ".PNG") - NDS_WritePNG(filename.c_str()); - else if(toupper(strright(filename,4)) == ".BMP") - NDS_WriteBMP(filename.c_str()); + if(toupper(strright(filename,4)) == ".PNG") + NDS_WritePNG(filename.c_str()); + else if(toupper(strright(filename,4)) == ".BMP") + NDS_WriteBMP(filename.c_str()); + } + + if(unpause) NDS_UnPause(false); } void HK_StateSaveSlot(int num, bool justPressed)