Force update tool windows just after loading a savestate

This commit is contained in:
gocha 2010-04-16 23:39:09 +00:00
parent 4b27cf9372
commit a8b68ad833
3 changed files with 13 additions and 6 deletions

View File

@ -165,8 +165,7 @@ void HK_StateLoadSlot(int num, bool justPressed)
loadstate_slot(num); //Loadstate loadstate_slot(num); //Loadstate
lastSaveState = num; //Set last savestate used lastSaveState = num; //Set last savestate used
//adelikat: TODO this should be a single function call in main, that way we can expand as future dialogs need updating UpdateToolWindows();
Update_RAM_Search(); //Update_RAM_Watch() is also called; main.cpp - case IDM_STATE_LOAD: also calls these functions
if(!wasPaused) if(!wasPaused)
NDS_UnPause(); NDS_UnPause();

View File

@ -3072,6 +3072,15 @@ void WavEnd()
NDS_UnPause(); NDS_UnPause();
} }
void UpdateToolWindows()
{
Update_RAM_Search(); //Update_RAM_Watch() is also called; hotkey.cpp - HK_StateLoadSlot & State_Load also call these functions
if(SoundView_IsOpened()) SoundView_Refresh();
RefreshAllToolWindows();
mainLoopData.toolframecount = 0;
}
//Shows an Open File menu and starts recording an WAV //Shows an Open File menu and starts recording an WAV
void WavRecordTo(int wavmode) void WavRecordTo(int wavmode)
{ {
@ -4179,8 +4188,7 @@ DOKEYDOWN:
if ((fileDropped[extIndex+3] >= '0' && fileDropped[extIndex+3] <= '9') || fileDropped[extIndex+3] == '-' || fileDropped[extIndex+3] == 't') //If last character is 0-9 (making .ds0 - .ds9) or .dst if ((fileDropped[extIndex+3] >= '0' && fileDropped[extIndex+3] <= '9') || fileDropped[extIndex+3] == '-' || fileDropped[extIndex+3] == 't') //If last character is 0-9 (making .ds0 - .ds9) or .dst
{ {
savestate_load(filename); savestate_load(filename);
//adelikat: TODO this should be a single function call in main, that way we can expand as future dialogs need updating UpdateToolWindows();
Update_RAM_Search(); //Update_RAM_Watch() is also called; hotkey.cpp - HK_StateLoadSlot & State_Load also call these functions
} }
} }
} }
@ -4561,8 +4569,7 @@ DOKEYDOWN:
} }
savestate_load(SavName); savestate_load(SavName);
//adelikat: TODO this should be a single function call in main, that way we can expand as future dialogs need updating UpdateToolWindows();
Update_RAM_Search(); //Update_RAM_Watch() is also called; hotkey.cpp - HK_StateLoadSlot also calls these functions
NDS_UnPause(); NDS_UnPause();
} }
return 0; return 0;

View File

@ -21,6 +21,7 @@ void AviRecordTo();
void AviEnd(); void AviEnd();
void WavRecordTo(int wavmode); void WavRecordTo(int wavmode);
void WavEnd(); void WavEnd();
void UpdateToolWindows();
extern bool frameCounterDisplay; extern bool frameCounterDisplay;
extern bool FpsDisplay; extern bool FpsDisplay;