Backup Savestate/Undo Loadstate code cleanup
This commit is contained in:
parent
d9471d1f75
commit
cba3dd6025
|
@ -76,15 +76,15 @@ bool CheckBackupSaveStateExist()
|
||||||
//Check if this filename exists
|
//Check if this filename exists
|
||||||
fstream test;
|
fstream test;
|
||||||
test.open(filename.c_str(),fstream::in);
|
test.open(filename.c_str(),fstream::in);
|
||||||
FCEUI_printf("Checking %s\n",filename.c_str());
|
|
||||||
if (test.fail())
|
if (test.fail())
|
||||||
{
|
{
|
||||||
test.close(); FCEUI_printf("Fail\n");
|
test.close();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
test.close(); FCEUI_printf("Succeed\n");
|
test.close();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -437,7 +437,6 @@ void UpdateContextMenuItems(HMENU context, int whichContext)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/// Updates recent files / recent directories menu
|
/// Updates recent files / recent directories menu
|
||||||
/// @param menu Menu handle of the main window's menu
|
/// @param menu Menu handle of the main window's menu
|
||||||
/// @param strs Strings to add to the menu
|
/// @param strs Strings to add to the menu
|
||||||
|
@ -834,8 +833,14 @@ UpdateContextMenuItems(hfceuxcontextsub, whichContext);
|
||||||
if(!fullscreen && !changerecursive)
|
if(!fullscreen && !changerecursive)
|
||||||
switch(wParam)
|
switch(wParam)
|
||||||
{
|
{
|
||||||
case SIZE_MAXIMIZED: ismaximized = 1;SetMainWindowStuff();break;
|
case SIZE_MAXIMIZED:
|
||||||
case SIZE_RESTORED: ismaximized = 0;SetMainWindowStuff();break;
|
ismaximized = 1;
|
||||||
|
SetMainWindowStuff();
|
||||||
|
break;
|
||||||
|
case SIZE_RESTORED:
|
||||||
|
ismaximized = 0;
|
||||||
|
SetMainWindowStuff();
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case WM_SIZING:
|
case WM_SIZING:
|
||||||
|
|
|
@ -780,6 +780,7 @@ void FCEUI_SaveState(const char *fname)
|
||||||
if(!FCEU_IsValidUI(FCEUI_SAVESTATE)) return;
|
if(!FCEU_IsValidUI(FCEUI_SAVESTATE)) return;
|
||||||
|
|
||||||
StateShow=0;
|
StateShow=0;
|
||||||
|
|
||||||
FCEUSS_Save(fname);
|
FCEUSS_Save(fname);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -856,7 +857,6 @@ void BackupSaveState()
|
||||||
{
|
{
|
||||||
string filename = GetBackupFileName();
|
string filename = GetBackupFileName();
|
||||||
FCEUSS_Save(filename.c_str());
|
FCEUSS_Save(filename.c_str());
|
||||||
FCEUI_printf("File %s loaded.\n",filename.c_str());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void LoadBackup()
|
void LoadBackup()
|
||||||
|
|
Loading…
Reference in New Issue