win32: fix a bug in the last checkin

This commit is contained in:
zeromus 2009-07-17 04:17:07 +00:00
parent 6297f00247
commit b4c4d55ce2
1 changed files with 4 additions and 0 deletions

View File

@ -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());