Movies: Disable loading save states when playing or recording movies
This commit is contained in:
parent
c53237e90e
commit
eec3798e00
2 changed files with 10 additions and 2 deletions
|
@ -422,6 +422,10 @@ void Console::SaveState(ostream &saveStream)
|
|||
void Console::LoadState(istream &loadStream)
|
||||
{
|
||||
if(Instance->_initialized) {
|
||||
//Stop any movie that might have been playing/recording if a state is loaded
|
||||
//(Note: Loading a state is disabled in the UI while a movie is playing/recording)
|
||||
Movie::Stop();
|
||||
|
||||
Instance->_cpu->LoadSnapshot(&loadStream);
|
||||
Instance->_ppu->LoadSnapshot(&loadStream);
|
||||
Instance->_memoryManager->LoadSnapshot(&loadStream);
|
||||
|
|
|
@ -528,7 +528,9 @@ namespace Mesen.GUI.Forms
|
|||
bool isNetPlayClient = InteropEmu.IsConnected();
|
||||
|
||||
mnuPause.Enabled = mnuStop.Enabled = mnuReset.Enabled = (_emuThread != null && !isNetPlayClient);
|
||||
mnuSaveState.Enabled = mnuLoadState.Enabled = (_emuThread != null && !isNetPlayClient && !InteropEmu.IsNsf());
|
||||
mnuSaveState.Enabled = (_emuThread != null && !isNetPlayClient && !InteropEmu.IsNsf());
|
||||
mnuLoadState.Enabled = (_emuThread != null && !isNetPlayClient && !InteropEmu.IsNsf() && !InteropEmu.MoviePlaying() && !InteropEmu.MovieRecording());
|
||||
|
||||
mnuPause.Text = InteropEmu.IsPaused() ? ResourceHelper.GetMessage("Resume") : ResourceHelper.GetMessage("Pause");
|
||||
mnuPause.Image = InteropEmu.IsPaused() ? Mesen.GUI.Properties.Resources.Play : Mesen.GUI.Properties.Resources.Pause;
|
||||
|
||||
|
@ -707,9 +709,11 @@ namespace Mesen.GUI.Forms
|
|||
if(forSave) {
|
||||
InteropEmu.SaveState(stateIndex);
|
||||
} else {
|
||||
if(!InteropEmu.MoviePlaying() && !InteropEmu.MovieRecording()) {
|
||||
InteropEmu.LoadState(stateIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
item.ShortcutKeys = (Keys)((int)Keys.F1 + i - 1);
|
||||
if(forSave) {
|
||||
|
|
Loading…
Add table
Reference in a new issue