Merge pull request #8279 from spycrab/fix_save_state_wait
Fix saving states freezing up emulation
This commit is contained in:
commit
7afba6776f
|
@ -323,7 +323,7 @@ static void CompressAndDumpState(CompressAndDumpState_args save_args)
|
|||
|
||||
if (!File::Rename(filename, File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav"))
|
||||
Core::DisplayMessage("Failed to move previous state to state undo backup", 1000);
|
||||
else
|
||||
else if (File::Exists(filename + ".dtm"))
|
||||
File::Rename(filename + ".dtm", File::GetUserPath(D_STATESAVES_IDX) + "lastState.sav.dtm");
|
||||
}
|
||||
|
||||
|
|
|
@ -1183,8 +1183,7 @@ void MainWindow::StateLoadSlot()
|
|||
|
||||
void MainWindow::StateSaveSlot()
|
||||
{
|
||||
State::Save(m_state_slot, true);
|
||||
m_menu_bar->UpdateStateSlotMenu();
|
||||
State::Save(m_state_slot);
|
||||
}
|
||||
|
||||
void MainWindow::StateLoadSlotAt(int slot)
|
||||
|
@ -1199,8 +1198,7 @@ void MainWindow::StateLoadLastSavedAt(int slot)
|
|||
|
||||
void MainWindow::StateSaveSlotAt(int slot)
|
||||
{
|
||||
State::Save(slot, true);
|
||||
m_menu_bar->UpdateStateSlotMenu();
|
||||
State::Save(slot);
|
||||
}
|
||||
|
||||
void MainWindow::StateLoadUndo()
|
||||
|
|
|
@ -313,6 +313,9 @@ void MenuBar::AddEmulationMenu()
|
|||
AddStateSaveMenu(emu_menu);
|
||||
AddStateSlotMenu(emu_menu);
|
||||
UpdateStateSlotMenu();
|
||||
|
||||
for (QMenu* menu : {m_state_load_menu, m_state_save_menu, m_state_slot_menu})
|
||||
connect(menu, &QMenu::aboutToShow, this, &MenuBar::UpdateStateSlotMenu);
|
||||
}
|
||||
|
||||
void MenuBar::AddStateLoadMenu(QMenu* emu_menu)
|
||||
|
|
|
@ -37,7 +37,6 @@ public:
|
|||
|
||||
explicit MenuBar(QWidget* parent = nullptr);
|
||||
|
||||
void UpdateStateSlotMenu();
|
||||
void UpdateToolsMenu(bool emulation_started);
|
||||
|
||||
QMenu* GetListColumnsMenu() const { return m_cols_menu; }
|
||||
|
@ -140,6 +139,8 @@ private:
|
|||
void AddJITMenu();
|
||||
void AddSymbolsMenu();
|
||||
|
||||
void UpdateStateSlotMenu();
|
||||
|
||||
void InstallWAD();
|
||||
void ImportWiiSave();
|
||||
void ExportWiiSaves();
|
||||
|
|
Loading…
Reference in New Issue