Win32 - Drag & Drop support for savestates

This commit is contained in:
adelikat 2009-06-24 02:05:31 +00:00
parent 71259457a2
commit 0d3323887c
2 changed files with 17 additions and 2 deletions

View File

@ -1,3 +1,4 @@
23-jun-2009 - adelikat - win32 - Drag & Drop support for savestates
22-jun-2009 - qeed - Revert IRQ inhibit fix, since this seems to break Dragon 22-jun-2009 - qeed - Revert IRQ inhibit fix, since this seems to break Dragon
Warrior 4, added palette reading cases for the new PPU. Warrior 4, added palette reading cases for the new PPU.
21-jun-2009 - adelikat - win32 - memwatch - save menu item is grayed if file hasn't changed 21-jun-2009 - adelikat - win32 - memwatch - save menu item is grayed if file hasn't changed

View File

@ -1252,13 +1252,27 @@ LRESULT FAR PASCAL AppWndProc(HWND hWnd,UINT msg,WPARAM wParam,LPARAM lParam)
//------------------------------------------------------- //-------------------------------------------------------
if (!(fileDropped.find(".fm2") == string::npos)) //ROM is already loaded and .fm2 in filename 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 if (GameInfo && !(fileDropped.find(".fm2") == string::npos)) //.fm2 is at the end of the filename so that must be the extension TODO: This doesn't do anything to check if it is at the end
FCEUI_LoadMovie(ftmp, 1, false, false); //We are convinced it is a movie file, attempt to load it FCEUI_LoadMovie(ftmp, 1, false, false); //We are convinced it is a movie file, attempt to load it
} }
//------------------------------------------------------- //-------------------------------------------------------
//Check if Savestate file
//-------------------------------------------------------
else if (!(fileDropped.find(".fc") == string::npos))
{
if (fileDropped.find(".fc") == fileDropped.length()-4) //Check to see it is both at the end (file extension) and there is on more character
{
if (fileDropped[fileDropped.length()-1] >= '0' && fileDropped[fileDropped.length()-1] <= '9') //If last character is 0-9 (making .fc0 - .fc9)
{
FCEUI_LoadState(fileDropped.c_str());
}
}
}
//-------------------------------------------------------
//Check if Lua file //Check if Lua file
//------------------------------------------------------- //-------------------------------------------------------
else if (!(fileDropped.find(".lua") == string::npos) && !(fileDropped.find(".lua") == string::npos)) else if (!(fileDropped.find(".lua") == string::npos) && !(fileDropped.find(".lua") == string::npos)) //TODO && same thing ? this needs to check that .lua is the file extension using .length method
FCEU_LoadLuaCode(ftmp); FCEU_LoadLuaCode(ftmp);
//------------------------------------------------------- //-------------------------------------------------------
//If not a movie, Load it as a ROM file //If not a movie, Load it as a ROM file