settings: Disable FPS unlimit setting between title launches

Some titles crash if the FPS limit is disabled when launching. This change ensures that titles launch with the limit in-place to avoid issues.
In order to simplify the change, the UI toggle was removed as it will always be overridden at launch to be disabled.
The setting can still be toggled during gameplay with the hotkey, and indicated by the fps label in the status bar.
This commit is contained in:
ameerj
2021-07-08 19:53:42 -04:00
parent 5edc96f4a4
commit 58219d1f36
6 changed files with 10 additions and 29 deletions

View File

@ -1355,6 +1355,9 @@ void GMainWindow::BootGame(const QString& filename, std::size_t program_index, S
ConfigureVibration::SetAllVibrationDevices();
// Disable fps limit toggle when booting a new title
Settings::values.disable_fps_limit.SetValue(false);
// Save configurations
UpdateUISettings();
game_list->SaveInterfaceLayout();
@ -2913,7 +2916,12 @@ void GMainWindow::UpdateStatusBar() {
} else {
emu_speed_label->setText(tr("Speed: %1%").arg(results.emulation_speed * 100.0, 0, 'f', 0));
}
game_fps_label->setText(tr("Game: %1 FPS").arg(results.average_game_fps, 0, 'f', 0));
if (Settings::values.disable_fps_limit) {
game_fps_label->setText(
tr("Game: %1 FPS (Limit off)").arg(results.average_game_fps, 0, 'f', 0));
} else {
game_fps_label->setText(tr("Game: %1 FPS").arg(results.average_game_fps, 0, 'f', 0));
}
emu_frametime_label->setText(tr("Frame: %1 ms").arg(results.frametime * 1000.0, 0, 'f', 2));
emu_speed_label->setVisible(!Settings::values.use_multi_core.GetValue());