Win32 - Drag & Drop for cheat (.cht) files

This commit is contained in:
adelikat 2009-07-01 14:17:27 +00:00
parent ba44fe906f
commit 78af47d32c
2 changed files with 14 additions and 2 deletions

View File

@ -1,3 +1,4 @@
01-july-2009 - adelikat - win32 - drag & drop for cheat (.cht) files
25-jun-2009 - qeed - sound/ppu - fixed the noise value, it seems that the noise logic was shifting the values to the left by 1 when reloading, but this doesnt work for PAL since one of the PAL reload value is odd, so fix the logic and used the old tables. Revert a stupid CPU ignore logic in PPU. Sorry about that.
25-jun-2009 - adelikat - Win32 - CD Logger - Drag and Drop for .cdl files
24-jun-2009 - qeed - sound/ppu - reverted to old noise table value since this seems to get correct sound for double

View File

@ -23,6 +23,7 @@
#include "../../input.h"
#include "../../state.h"
#include "../../cheat.h" //adelikat: For FCEU_LoadGameCheats()
#include "window.h"
#include "main.h"
#include "state.h"
@ -1254,10 +1255,20 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
DragQueryFile((HDROP)wParam,0,ftmp,len);
string fileDropped = ftmp;
//adelikat: Drag and Drop only checks file extension, the internal functions are responsible for file error checking
//-------------------------------------------------------
//Check if .fcm file, if so, convert it
//Check if a cheats (.cht) file
//-------------------------------------------------------
if (!(fileDropped.find(".fcm") == string::npos) && (fileDropped.find(".fcm") == fileDropped.length()-4))
if (!(fileDropped.find(".cht") == string::npos) && (fileDropped.find(".cht") == fileDropped.length()-4))
{
FILE* file = FCEUD_UTF8fopen(fileDropped.c_str(),"rb");
FCEU_LoadGameCheats(file);
}
//-------------------------------------------------------
//Check if .fcm file, if so, convert it and play the resulting .fm2
//-------------------------------------------------------
else if (!(fileDropped.find(".fcm") == string::npos) && (fileDropped.find(".fcm") == fileDropped.length()-4))
{
//produce output filename
std::string outname;