mirror of
https://git.eden-emu.dev/eden-emu/eden.git
synced 2025-10-18 13:07:48 +00:00
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.
This commit is contained in:
parent
f7454fabb3
commit
aeff61a0cc
16 changed files with 77 additions and 77 deletions
|
@ -806,8 +806,8 @@ void Config::ReadRendererValues() {
|
|||
ReadGlobalSetting(Settings::values.fullscreen_mode);
|
||||
ReadGlobalSetting(Settings::values.aspect_ratio);
|
||||
ReadGlobalSetting(Settings::values.max_anisotropy);
|
||||
ReadGlobalSetting(Settings::values.use_frame_limit);
|
||||
ReadGlobalSetting(Settings::values.frame_limit);
|
||||
ReadGlobalSetting(Settings::values.use_speed_limit);
|
||||
ReadGlobalSetting(Settings::values.speed_limit);
|
||||
ReadGlobalSetting(Settings::values.use_disk_shader_cache);
|
||||
ReadGlobalSetting(Settings::values.gpu_accuracy);
|
||||
ReadGlobalSetting(Settings::values.use_asynchronous_gpu_emulation);
|
||||
|
@ -1332,8 +1332,8 @@ void Config::SaveRendererValues() {
|
|||
WriteGlobalSetting(Settings::values.fullscreen_mode);
|
||||
WriteGlobalSetting(Settings::values.aspect_ratio);
|
||||
WriteGlobalSetting(Settings::values.max_anisotropy);
|
||||
WriteGlobalSetting(Settings::values.use_frame_limit);
|
||||
WriteGlobalSetting(Settings::values.frame_limit);
|
||||
WriteGlobalSetting(Settings::values.use_speed_limit);
|
||||
WriteGlobalSetting(Settings::values.speed_limit);
|
||||
WriteGlobalSetting(Settings::values.use_disk_shader_cache);
|
||||
WriteSetting(QString::fromStdString(Settings::values.gpu_accuracy.GetLabel()),
|
||||
static_cast<u32>(Settings::values.gpu_accuracy.GetValue(global)),
|
||||
|
|
|
@ -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));
|
||||
});
|
||||
}
|
||||
|
|
|
@ -43,6 +43,6 @@ private:
|
|||
|
||||
std::unique_ptr<Ui::ConfigureGeneral> ui;
|
||||
|
||||
ConfigurationShared::CheckState use_frame_limit;
|
||||
ConfigurationShared::CheckState use_speed_limit;
|
||||
ConfigurationShared::CheckState use_multi_core;
|
||||
};
|
||||
|
|
|
@ -27,14 +27,14 @@
|
|||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="toggle_frame_limit">
|
||||
<widget class="QCheckBox" name="toggle_speed_limit">
|
||||
<property name="text">
|
||||
<string>Limit Speed Percent</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="frame_limit">
|
||||
<widget class="QSpinBox" name="speed_limit">
|
||||
<property name="suffix">
|
||||
<string>%</string>
|
||||
</property>
|
||||
|
|
|
@ -985,23 +985,23 @@ void GMainWindow::InitializeHotkeys() {
|
|||
});
|
||||
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Toggle Speed Limit"), this),
|
||||
&QShortcut::activated, this, [&] {
|
||||
Settings::values.use_frame_limit.SetValue(
|
||||
!Settings::values.use_frame_limit.GetValue());
|
||||
Settings::values.use_speed_limit.SetValue(
|
||||
!Settings::values.use_speed_limit.GetValue());
|
||||
UpdateStatusBar();
|
||||
});
|
||||
constexpr u16 SPEED_LIMIT_STEP = 5;
|
||||
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Increase Speed Limit"), this),
|
||||
&QShortcut::activated, this, [&] {
|
||||
if (Settings::values.frame_limit.GetValue() < 9999 - SPEED_LIMIT_STEP) {
|
||||
Settings::values.frame_limit.SetValue(SPEED_LIMIT_STEP +
|
||||
Settings::values.frame_limit.GetValue());
|
||||
if (Settings::values.speed_limit.GetValue() < 9999 - SPEED_LIMIT_STEP) {
|
||||
Settings::values.speed_limit.SetValue(SPEED_LIMIT_STEP +
|
||||
Settings::values.speed_limit.GetValue());
|
||||
UpdateStatusBar();
|
||||
}
|
||||
});
|
||||
connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Decrease Speed Limit"), this),
|
||||
&QShortcut::activated, this, [&] {
|
||||
if (Settings::values.frame_limit.GetValue() > SPEED_LIMIT_STEP) {
|
||||
Settings::values.frame_limit.SetValue(Settings::values.frame_limit.GetValue() -
|
||||
if (Settings::values.speed_limit.GetValue() > SPEED_LIMIT_STEP) {
|
||||
Settings::values.speed_limit.SetValue(Settings::values.speed_limit.GetValue() -
|
||||
SPEED_LIMIT_STEP);
|
||||
UpdateStatusBar();
|
||||
}
|
||||
|
@ -2912,10 +2912,10 @@ void GMainWindow::UpdateStatusBar() {
|
|||
shader_building_label->setVisible(false);
|
||||
}
|
||||
|
||||
if (Settings::values.use_frame_limit.GetValue()) {
|
||||
if (Settings::values.use_speed_limit.GetValue()) {
|
||||
emu_speed_label->setText(tr("Speed: %1% / %2%")
|
||||
.arg(results.emulation_speed * 100.0, 0, 'f', 0)
|
||||
.arg(Settings::values.frame_limit.GetValue()));
|
||||
.arg(Settings::values.speed_limit.GetValue()));
|
||||
} else {
|
||||
emu_speed_label->setText(tr("Speed: %1%").arg(results.emulation_speed * 100.0, 0, 'f', 0));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue