diff --git a/desmume/src/windows/main.cpp b/desmume/src/windows/main.cpp index 8ff13790f..fb20fda9c 100644 --- a/desmume/src/windows/main.cpp +++ b/desmume/src/windows/main.cpp @@ -3421,7 +3421,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM //------------------------------------------------------- //Check if Lua script file //------------------------------------------------------- - if (!(fileDropped.find(".lua") == string::npos) && (fileDropped.find(".lua") == fileDropped.length()-4)) //ROM is already loaded and .dsm in filename + else if (!(fileDropped.find(".lua") == string::npos) && (fileDropped.find(".lua") == fileDropped.length()-4)) //ROM is already loaded and .dsm in filename { if(LuaScriptHWnds.size() < 16) { @@ -3436,6 +3436,21 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM } } + //------------------------------------------------------- + //Check if watchlist file + //------------------------------------------------------- + else if (!(fileDropped.find(".wch") == string::npos) && (fileDropped.find(".wch") == fileDropped.length()-4)) //ROM is already loaded and .dsm in filename + { + if(!RamWatchHWnd) + { + RamWatchHWnd = CreateDialog(hAppInst, MAKEINTRESOURCE(IDD_RAMWATCH), hwnd, (DLGPROC) RamWatchProc); + // DialogsOpen++; + } + else + SetForegroundWindow(RamWatchHWnd); + Load_Watches(true, fileDropped.c_str()); + } + //------------------------------------------------------- //Else load it as a ROM //-------------------------------------------------------