PCSX2: Save/load slot improvements.

With these changes, saveslots will be labeled as either empty or
with the date that the file was last updated on. The menu items
for loading them are also disabled if the slot is empty.

It's possible if you are very fast to access the menu before the
slots change. It updates when the crc changes. When you save a saveslot,
the menu item also changes to show the time you told it to save until the
file is actually done saving.

Also fix an issue with backup saveslots not working properly from the
gui on first load.
This commit is contained in:
arcum42
2018-08-26 15:06:35 -07:00
committed by lightningterror
parent 6e3f41f164
commit 9cb35a8972
11 changed files with 232 additions and 106 deletions

View File

@@ -28,6 +28,7 @@
#include "AppAccelerators.h"
#include "svnrev.h"
#include "Saveslots.h"
// ------------------------------------------------------------------------
wxMenu* MainEmuFrame::MakeStatesSubMenu( int baseid, int loadBackupId ) const
@@ -36,18 +37,18 @@ wxMenu* MainEmuFrame::MakeStatesSubMenu( int baseid, int loadBackupId ) const
for (int i = 0; i < 10; i++)
{
mnuSubstates->Append( baseid+i+1, wxsFormat(_("Slot %d"), i) );
// Will be changed once an iso is loaded.
mnuSubstates->Append(baseid + i + 1, wxsFormat(_("Slot %d"), i));
}
if( loadBackupId>=0 )
if (loadBackupId >= 0)
{
mnuSubstates->AppendSeparator();
wxMenuItem* m = mnuSubstates->Append( loadBackupId, _("Backup") );
wxMenuItem* m = mnuSubstates->Append(loadBackupId, _("Backup"));
m->Enable( false );
States_registerLoadBackupMenuItem( m );
}
//mnuSubstates->Append( baseid - 1, _("Other...") );
return mnuSubstates;
}
@@ -787,4 +788,3 @@ void PerPluginMenuInfo::OnLoaded()
);
MyMenu.Enable( GetPluginMenuId_Settings(PluginId), true );
}