win32: screenshot: fix failure to save pngs and failure to respect user specified path

This commit is contained in:
zeromus 2009-07-17 21:04:42 +00:00
parent 087e9ae5ed
commit f71921404c
1 changed files with 3 additions and 2 deletions

View File

@ -118,9 +118,10 @@ void HK_PrintScreen(int param)
strcpy(outFilename,filename.c_str());
if(!GetSaveFileName(&ofn))
return;
filename = outFilename;
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());
}