From b4c4d55ce24ecd05ebb687c81b4fc85512fc11a4 Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 17 Jul 2009 04:17:07 +0000 Subject: [PATCH] win32: fix a bug in the last checkin --- desmume/src/windows/hotkey.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/desmume/src/windows/hotkey.cpp b/desmume/src/windows/hotkey.cpp index 9554eec01..8e44c6f72 100644 --- a/desmume/src/windows/hotkey.cpp +++ b/desmume/src/windows/hotkey.cpp @@ -86,6 +86,7 @@ void HK_PrintScreen(int param) char outFilename[MAX_PATH]; OPENFILENAME ofn; + ZeroMemory(&ofn,sizeof(ofn)); ofn.lStructSize = sizeof(ofn); ofn.hwndOwner = MainWindow->getHWnd(); ofn.lpstrFilter = "png file (*.png)\0*.png\0Bmp file (*.bmp)\0*.bmp\0Any file (*.*)\0*.*\0\0"; @@ -116,7 +117,10 @@ void HK_PrintScreen(int param) strcpy(outFilename,filename.c_str()); if(!GetSaveFileName(&ofn)) + { + MessageBox(0,"OHNO",0,0); return; + } if(toupper(strright(filename,4)) == ".BMP") NDS_WriteBMP(filename.c_str());