From f71921404c621c79e43edc8c3d76b012e71c81e8 Mon Sep 17 00:00:00 2001 From: zeromus Date: Fri, 17 Jul 2009 21:04:42 +0000 Subject: [PATCH] win32: screenshot: fix failure to save pngs and failure to respect user specified path --- desmume/src/windows/hotkey.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/desmume/src/windows/hotkey.cpp b/desmume/src/windows/hotkey.cpp index df441f5ab..971bd5e1d 100644 --- a/desmume/src/windows/hotkey.cpp +++ b/desmume/src/windows/hotkey.cpp @@ -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()); }