Make it easy to turn on and off the new saveslot code. Comment out a UI update that doesn't look needed that could have been causing issues.

This commit is contained in:
Shanoah Alkire 2018-09-29 14:27:58 -07:00
parent e90c87a8ef
commit 042311a827
5 changed files with 17 additions and 1 deletions

View File

@ -236,7 +236,9 @@ void SysCoreThread::GameStartingInThread()
sApp.PostAppMethod(&Pcsx2App::resetDebugger);
ApplyLoadedPatches(PPT_ONCE_ON_LOAD);
#ifdef USE_NEW_SAVESLOTS_UI
UI_UpdateSysControls();
#endif
}
bool SysCoreThread::StateCheckInThread()

View File

@ -76,10 +76,12 @@ void States_FreezeCurrentSlot()
GSchangeSaveState(StatesC, SaveStateBase::GetFilename(StatesC).ToUTF8());
StateCopy_SaveToSlot(StatesC);
#ifdef USE_NEW_SAVESLOTS_UI
// Hack: Update the saveslot saying it's filled *right now* because it's still writing the file and we don't have a timestamp.
saveslot_cache[StatesC].empty = false;
saveslot_cache[StatesC].updated = wxDateTime::Now();
saveslot_cache[StatesC].crc = ElfCRC;
#endif
GetSysExecutorThread().PostIdleEvent(SysExecEvent_ClearSavingLoadingFlag());
}

View File

@ -20,6 +20,8 @@
#include "System.h"
#include "Elfheader.h"
#define USE_NEW_SAVESLOTS_UI
class Saveslot
{
public:

View File

@ -476,7 +476,11 @@ protected:
void CleanupEvent()
{
UI_UpdateSysControls();
#ifdef USE_NEW_SAVESLOTS_UI
// I have a feeling this doesn't need to be here, so I'm commenting this out for the moment.
// I'll remove it if it doesn't cause other issues.
//UI_UpdateSysControls();
#endif
}
};
@ -675,7 +679,9 @@ void StateCopy_SaveToSlot( uint num )
Console.Indent().WriteLn( Color_StrongGreen, L"filename: %s", WX_STR(file) );
StateCopy_SaveToFile( file );
#ifdef USE_NEW_SAVESLOTS_UI
UI_UpdateSysControls();
#endif
}
void StateCopy_LoadFromSlot( uint slot, bool isFromBackup )
@ -692,5 +698,7 @@ void StateCopy_LoadFromSlot( uint slot, bool isFromBackup )
Console.Indent().WriteLn( Color_StrongGreen, L"filename: %s", WX_STR(file) );
StateCopy_LoadFromFile( file );
#ifdef USE_NEW_SAVESLOTS_UI
UI_UpdateSysControls();
#endif
}

View File

@ -43,6 +43,7 @@ static void _SaveLoadStuff(bool enabled)
sMainFrame.EnableMenuItem(MenuId_Sys_LoadStates, enabled);
sMainFrame.EnableMenuItem(MenuId_Sys_SaveStates, enabled);
#ifdef USE_NEW_SAVESLOTS_UI
for (int i = 0; i < 10; i++)
{
int load_menu_item = MenuId_State_Load01 + i + 1;
@ -65,6 +66,7 @@ static void _SaveLoadStuff(bool enabled)
sMainFrame.SetMenuItemLabel(save_menu_item, saveslot_cache[i].SlotName());
}
Sstates_updateLoadBackupMenuItem(false);
#endif
}
// Updates the enable/disable status of all System related controls: menus, toolbars,