diff --git a/changelog.txt b/changelog.txt index f4e0b3da..84765742 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,4 +1,5 @@ ---version 2.0.4 yet to be released--- +02-mar-2009 - adelikat - win32 - Drag & Drop for Memwatch dialog (.txt files) 01-mar-2009 - adelikat - win32 - Drag & Drop Lua files 25-feb-2009 - adelikat - win32 - Memwatch - added cancel to save changes? message box 22-feb-2009 - adelikat - win32 - Lua - made speedmode("turbo") turn on turbo (which employs frameskipping) rather than max speed diff --git a/src/drivers/win/memwatch.cpp b/src/drivers/win/memwatch.cpp index d99fd478..da8bad14 100644 --- a/src/drivers/win/memwatch.cpp +++ b/src/drivers/win/memwatch.cpp @@ -777,6 +777,33 @@ static BOOL CALLBACK MemWatchCallB(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARA case WM_QUIT: CloseMemoryWatch(); break; + + case WM_DROPFILES: + { + unsigned int len; + char *ftmp; + + len=DragQueryFile((HDROP)wParam,0,0,0)+1; + if((ftmp=(char*)malloc(len))) + { + DragQueryFile((HDROP)wParam,0,ftmp,len); + string fileDropped = ftmp; + + //------------------------------------------------------- + //Check if .txt file + //------------------------------------------------------- + if (!(fileDropped.find(".txt") == string::npos)) //ROM is already loaded and .txt in filename + { + if (GameInfo && !(fileDropped.find(".txt") == string::npos)) //.txt is at the end of the filename so that must be the extension + { + MemwAddRecentFile(ftmp); + OpenMemwatchRecentFile(0); + } + } + } + } + break; + case WM_COMMAND: //Menu Items diff --git a/src/drivers/win/res.rc b/src/drivers/win/res.rc index 3db21c9d..a4b026b9 100644 --- a/src/drivers/win/res.rc +++ b/src/drivers/win/res.rc @@ -829,6 +829,7 @@ END MEMWATCH DIALOGEX 0, 0, 261, 270 STYLE DS_SETFONT | DS_MODALFRAME | DS_3DLOOK | WS_MINIMIZEBOX | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU +EXSTYLE WS_EX_ACCEPTFILES CAPTION "Memory Watch" MENU MEMWATCHMENU FONT 8, "MS Sans Serif", 0, 0, 0x0 diff --git a/src/file.cpp b/src/file.cpp index 7e194054..440fb7e2 100644 --- a/src/file.cpp +++ b/src/file.cpp @@ -483,7 +483,7 @@ static char *odirs[FCEUIOD__COUNT]={0,0,0,0,0,0,0,0,0,0,0,0,0}; // odirs, od void FCEUI_SetDirOverride(int which, char *n) { - // FCEU_PrintError("odirs[%d]=%s->%s", which, odirs[which], n); + FCEU_PrintError("odirs[%d]=%s->%s", which, odirs[which], n); if (which < FCEUIOD__COUNT) { odirs[which] = n;