More Cleanup

This commit is contained in:
Mahmood - Zer0xFF 2024-10-20 12:57:45 +01:00
parent ba0e3001ba
commit f8dc926c45

View file

@ -530,10 +530,10 @@ void MainWindow::CreateStatusBar()
m_gsLabel->setContextMenuPolicy(Qt::CustomContextMenu);
connect(m_gsLabel, &QLabel::customContextMenuRequested, [&]() {
auto gs_index = CAppConfig::GetInstance().GetPreferenceInteger(PREF_VIDEO_GS_HANDLER);
gs_index = (gs_index + 1) % SettingsDialog::GS_HANDLERS::MAX_HANDLER;
CAppConfig::GetInstance().SetPreferenceInteger(PREF_VIDEO_GS_HANDLER, gs_index);
if(m_virtualMachine)
{
gs_index = (gs_index + 1) % SettingsDialog::GS_HANDLERS::MAX_HANDLER;
CAppConfig::GetInstance().SetPreferenceInteger(PREF_VIDEO_GS_HANDLER, gs_index);
SetupGsHandler();
}
UpdateGSHandlerLabel();
@ -582,7 +582,6 @@ void MainWindow::on_actionSettings_triggered()
auto new_gs_index = CAppConfig::GetInstance().GetPreferenceInteger(PREF_VIDEO_GS_HANDLER);
if(gs_index != new_gs_index)
{
UpdateGSHandlerLabel();
SetupGsHandler();
}
else
@ -595,6 +594,10 @@ void MainWindow::on_actionSettings_triggered()
}
}
}
else
{
UpdateGSHandlerLabel();
}
}
void MainWindow::SetupSaveLoadStateSlots()