UI: Enable "System" and toolbar savestate options in OSDSYS

Saving state in OSDSYS was supported and worked fine with hotkeys, the UI just didn't reflect that.
This commit is contained in:
Ty Lamontagne 2024-08-28 12:03:56 -04:00 committed by Ty
parent 42e4a47bfc
commit a8ce6a9f0e
1 changed files with 2 additions and 6 deletions

View File

@ -872,6 +872,7 @@ void MainWindow::updateEmulationActions(bool starting, bool running, bool stoppi
m_ui.actionPause->setEnabled(running); m_ui.actionPause->setEnabled(running);
m_ui.actionScreenshot->setEnabled(running); m_ui.actionScreenshot->setEnabled(running);
m_ui.menuChangeDisc->setEnabled(running); m_ui.menuChangeDisc->setEnabled(running);
m_ui.menuLoadState->setEnabled(running);
m_ui.menuSaveState->setEnabled(running); m_ui.menuSaveState->setEnabled(running);
m_ui.actionSaveGSDump->setEnabled(running); m_ui.actionSaveGSDump->setEnabled(running);
@ -880,6 +881,7 @@ void MainWindow::updateEmulationActions(bool starting, bool running, bool stoppi
m_ui.actionToolbarPause->setEnabled(running); m_ui.actionToolbarPause->setEnabled(running);
m_ui.actionToolbarScreenshot->setEnabled(running); m_ui.actionToolbarScreenshot->setEnabled(running);
m_ui.actionToolbarChangeDisc->setEnabled(running); m_ui.actionToolbarChangeDisc->setEnabled(running);
m_ui.actionToolbarLoadState->setEnabled(running);
m_ui.actionToolbarSaveState->setEnabled(running); m_ui.actionToolbarSaveState->setEnabled(running);
m_ui.actionViewGameProperties->setEnabled(running); m_ui.actionViewGameProperties->setEnabled(running);
@ -2929,12 +2931,6 @@ void MainWindow::populateSaveStateMenu(QMenu* menu, const QString& serial, quint
void MainWindow::updateGameDependentActions() void MainWindow::updateGameDependentActions()
{ {
const bool valid_serial_and_crc = (s_vm_valid && !s_current_disc_serial.isEmpty() && s_current_disc_crc != 0);
m_ui.menuLoadState->setEnabled(valid_serial_and_crc);
m_ui.actionToolbarLoadState->setEnabled(valid_serial_and_crc);
m_ui.menuSaveState->setEnabled(valid_serial_and_crc);
m_ui.actionToolbarSaveState->setEnabled(valid_serial_and_crc);
const bool can_use_pnach = (s_vm_valid && !s_current_disc_serial.isEmpty() && s_current_running_crc != 0); const bool can_use_pnach = (s_vm_valid && !s_current_disc_serial.isEmpty() && s_current_running_crc != 0);
m_ui.actionEditCheats->setEnabled(can_use_pnach); m_ui.actionEditCheats->setEnabled(can_use_pnach);
m_ui.actionEditPatches->setEnabled(can_use_pnach); m_ui.actionEditPatches->setEnabled(can_use_pnach);