diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-22 19:56:21 -0400 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-07-23 22:10:01 -0400 |
commit | 9dfbc9bdce15c299faf06aa7bf68a8660366daee (patch) | |
tree | 83ae648f51b4d0d2bb484741f86f5fb9bce8d00b /src/yuzu/configuration/configure_general.cpp | |
parent | db46f8a70c853ccab3318abed1416231a3c426db (diff) |
general: Rename "Frame Limit" references to "Speed Limit"
This setting is best referred to as a speed limit, as it involves the limits of all timing based aspects of the emulator, not only framerate.
This allows us to differentiate it from the fps unlocker setting.
Diffstat (limited to 'src/yuzu/configuration/configure_general.cpp')
-rw-r--r-- | src/yuzu/configuration/configure_general.cpp | 46 |
1 files changed, 23 insertions, 23 deletions
diff --git a/src/yuzu/configuration/configure_general.cpp b/src/yuzu/configuration/configure_general.cpp index 18f25def62..6e5d2d981f 100644 --- a/src/yuzu/configuration/configure_general.cpp +++ b/src/yuzu/configuration/configure_general.cpp @@ -24,8 +24,8 @@ ConfigureGeneral::ConfigureGeneral(QWidget* parent) SetConfiguration(); if (Settings::IsConfiguringGlobal()) { - connect(ui->toggle_frame_limit, &QCheckBox::clicked, ui->frame_limit, - [this]() { ui->frame_limit->setEnabled(ui->toggle_frame_limit->isChecked()); }); + connect(ui->toggle_speed_limit, &QCheckBox::clicked, ui->speed_limit, + [this]() { ui->speed_limit->setEnabled(ui->toggle_speed_limit->isChecked()); }); } connect(ui->button_reset_defaults, &QPushButton::clicked, this, @@ -45,16 +45,16 @@ void ConfigureGeneral::SetConfiguration() { ui->toggle_background_pause->setChecked(UISettings::values.pause_when_in_background.GetValue()); ui->toggle_hide_mouse->setChecked(UISettings::values.hide_mouse.GetValue()); - ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit.GetValue()); - ui->frame_limit->setValue(Settings::values.frame_limit.GetValue()); + ui->toggle_speed_limit->setChecked(Settings::values.use_speed_limit.GetValue()); + ui->speed_limit->setValue(Settings::values.speed_limit.GetValue()); ui->button_reset_defaults->setEnabled(runtime_lock); if (Settings::IsConfiguringGlobal()) { - ui->frame_limit->setEnabled(Settings::values.use_frame_limit.GetValue()); + ui->speed_limit->setEnabled(Settings::values.use_speed_limit.GetValue()); } else { - ui->frame_limit->setEnabled(Settings::values.use_frame_limit.GetValue() && - use_frame_limit != ConfigurationShared::CheckState::Global); + ui->speed_limit->setEnabled(Settings::values.use_speed_limit.GetValue() && + use_speed_limit != ConfigurationShared::CheckState::Global); } } @@ -88,19 +88,19 @@ void ConfigureGeneral::ApplyConfiguration() { UISettings::values.hide_mouse = ui->toggle_hide_mouse->isChecked(); // Guard if during game and set to game-specific value - if (Settings::values.use_frame_limit.UsingGlobal()) { - Settings::values.use_frame_limit.SetValue(ui->toggle_frame_limit->checkState() == + if (Settings::values.use_speed_limit.UsingGlobal()) { + Settings::values.use_speed_limit.SetValue(ui->toggle_speed_limit->checkState() == Qt::Checked); - Settings::values.frame_limit.SetValue(ui->frame_limit->value()); + Settings::values.speed_limit.SetValue(ui->speed_limit->value()); } } else { - bool global_frame_limit = use_frame_limit == ConfigurationShared::CheckState::Global; - Settings::values.use_frame_limit.SetGlobal(global_frame_limit); - Settings::values.frame_limit.SetGlobal(global_frame_limit); - if (!global_frame_limit) { - Settings::values.use_frame_limit.SetValue(ui->toggle_frame_limit->checkState() == + bool global_speed_limit = use_speed_limit == ConfigurationShared::CheckState::Global; + Settings::values.use_speed_limit.SetGlobal(global_speed_limit); + Settings::values.speed_limit.SetGlobal(global_speed_limit); + if (!global_speed_limit) { + Settings::values.use_speed_limit.SetValue(ui->toggle_speed_limit->checkState() == Qt::Checked); - Settings::values.frame_limit.SetValue(ui->frame_limit->value()); + Settings::values.speed_limit.SetValue(ui->speed_limit->value()); } } } @@ -122,8 +122,8 @@ void ConfigureGeneral::SetupPerGameUI() { // Disables each setting if: // - A game is running (thus settings in use), and // - A non-global setting is applied. - ui->toggle_frame_limit->setEnabled(Settings::values.use_frame_limit.UsingGlobal()); - ui->frame_limit->setEnabled(Settings::values.frame_limit.UsingGlobal()); + ui->toggle_speed_limit->setEnabled(Settings::values.use_speed_limit.UsingGlobal()); + ui->speed_limit->setEnabled(Settings::values.speed_limit.UsingGlobal()); return; } @@ -135,13 +135,13 @@ void ConfigureGeneral::SetupPerGameUI() { ui->button_reset_defaults->setVisible(false); - ConfigurationShared::SetColoredTristate(ui->toggle_frame_limit, - Settings::values.use_frame_limit, use_frame_limit); + ConfigurationShared::SetColoredTristate(ui->toggle_speed_limit, + Settings::values.use_speed_limit, use_speed_limit); ConfigurationShared::SetColoredTristate(ui->use_multi_core, Settings::values.use_multi_core, use_multi_core); - connect(ui->toggle_frame_limit, &QCheckBox::clicked, ui->frame_limit, [this]() { - ui->frame_limit->setEnabled(ui->toggle_frame_limit->isChecked() && - (use_frame_limit != ConfigurationShared::CheckState::Global)); + connect(ui->toggle_speed_limit, &QCheckBox::clicked, ui->speed_limit, [this]() { + ui->speed_limit->setEnabled(ui->toggle_speed_limit->isChecked() && + (use_speed_limit != ConfigurationShared::CheckState::Global)); }); } |