diff --git a/changelog.txt b/changelog.txt index 370f9dbe..ef4651ed 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,5 @@ ---version 2.0.4 yet to be released--- +15-nov-2008 - adelikat - win32 - Implemented Drap & Drop for movie files 14-nov-2008 - adelikat - win32 Hex Editor - Dump Rom & Dump PPU to file Dialog - uses ROM to build default filename 14-nov-2008 - adelikat - Win32 Memwatch - Save as dialog - uses ROM name to build default memwatch filename if there is no last used memwatch filename 14-nov-2008 - adelikat - Win32 Text Hooker fixes - Init error checking reinstated, save .tht file no longer crashes, Dialog updates as ROM plays, Remembers window position, fix bug where canceling save as produces an error message, Save As produces default filename based on loaded ROM diff --git a/src/drivers/win/window.cpp b/src/drivers/win/window.cpp index f198940d..040204ca 100644 --- a/src/drivers/win/window.cpp +++ b/src/drivers/win/window.cpp @@ -63,6 +63,8 @@ #include +using namespace std; + // Extern variables extern FCEUGI *GameInfo; @@ -789,13 +791,30 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam) UINT len; char *ftmp; - len=DragQueryFile((HDROP)wParam,0,0,0)+1; //mbg merge 7/17/06 changed (HANDLE) to (HDROP) - if((ftmp=(char*)malloc(len))) //mbg merge 7/17/06 added cast + len=DragQueryFile((HDROP)wParam,0,0,0)+1; + if((ftmp=(char*)malloc(len))) { - DragQueryFile((HDROP)wParam,0,ftmp,len); //mbg merge 7/17/06 changed (HANDLE) to (HDROP) + DragQueryFile((HDROP)wParam,0,ftmp,len); + string fileDropped = ftmp; + + //------------------------------------------------------- + //Check if Movie file + //------------------------------------------------------- + if (!(fileDropped.find(".fm2") == string::npos)) //ROM is already loaded and .fm2 in filename + { + if (GameInfo && !(fileDropped.find(".fm2") == string::npos)) //.fm2 is at the end of the filename so that must be the extension + FCEUI_LoadMovie(ftmp, 1, false, false); //We are convinced it is a movie file, attempt to load it + } + //------------------------------------------------------- + //If not a movie, Load it as a ROM file + //------------------------------------------------------- + else + { ALoad(ftmp); free(ftmp); - } + } + + } } break;