win32: main window now accepts dropped *.lua and *.wch files.

This commit is contained in:
gocha 2009-10-15 06:12:02 +00:00
parent ab70394898
commit e6c0897328
1 changed files with 16 additions and 1 deletions

View File

@ -3421,7 +3421,7 @@ LRESULT CALLBACK WindowProcedure (HWND hwnd, UINT message, WPARAM wParam, LPARAM
//------------------------------------------------------- //-------------------------------------------------------
//Check if Lua script file //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) 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 //Else load it as a ROM
//------------------------------------------------------- //-------------------------------------------------------