mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-27 05:07:51 -05:00
yuzu: settings: Remove framerate cap and merge unlocked framerate setting.
- These were all somewhat redundant.
This commit is contained in:
@ -668,7 +668,6 @@ void Config::ReadRendererValues() {
|
||||
ReadGlobalSetting(Settings::values.max_anisotropy);
|
||||
ReadGlobalSetting(Settings::values.use_speed_limit);
|
||||
ReadGlobalSetting(Settings::values.speed_limit);
|
||||
ReadGlobalSetting(Settings::values.fps_cap);
|
||||
ReadGlobalSetting(Settings::values.use_disk_shader_cache);
|
||||
ReadGlobalSetting(Settings::values.gpu_accuracy);
|
||||
ReadGlobalSetting(Settings::values.use_asynchronous_gpu_emulation);
|
||||
@ -1237,7 +1236,6 @@ void Config::SaveRendererValues() {
|
||||
WriteGlobalSetting(Settings::values.max_anisotropy);
|
||||
WriteGlobalSetting(Settings::values.use_speed_limit);
|
||||
WriteGlobalSetting(Settings::values.speed_limit);
|
||||
WriteGlobalSetting(Settings::values.fps_cap);
|
||||
WriteGlobalSetting(Settings::values.use_disk_shader_cache);
|
||||
WriteSetting(QString::fromStdString(Settings::values.gpu_accuracy.GetLabel()),
|
||||
static_cast<u32>(Settings::values.gpu_accuracy.GetValue(global)),
|
||||
|
@ -27,9 +27,6 @@ ConfigureGeneral::ConfigureGeneral(const Core::System& system_, QWidget* parent)
|
||||
|
||||
connect(ui->button_reset_defaults, &QPushButton::clicked, this,
|
||||
&ConfigureGeneral::ResetDefaults);
|
||||
|
||||
ui->fps_cap_label->setVisible(Settings::IsConfiguringGlobal());
|
||||
ui->fps_cap_combobox->setVisible(!Settings::IsConfiguringGlobal());
|
||||
}
|
||||
|
||||
ConfigureGeneral::~ConfigureGeneral() = default;
|
||||
@ -52,8 +49,6 @@ void ConfigureGeneral::SetConfiguration() {
|
||||
ui->toggle_speed_limit->setChecked(Settings::values.use_speed_limit.GetValue());
|
||||
ui->speed_limit->setValue(Settings::values.speed_limit.GetValue());
|
||||
|
||||
ui->fps_cap->setValue(Settings::values.fps_cap.GetValue());
|
||||
|
||||
ui->button_reset_defaults->setEnabled(runtime_lock);
|
||||
|
||||
if (Settings::IsConfiguringGlobal()) {
|
||||
@ -61,11 +56,6 @@ void ConfigureGeneral::SetConfiguration() {
|
||||
} else {
|
||||
ui->speed_limit->setEnabled(Settings::values.use_speed_limit.GetValue() &&
|
||||
use_speed_limit != ConfigurationShared::CheckState::Global);
|
||||
|
||||
ui->fps_cap_combobox->setCurrentIndex(Settings::values.fps_cap.UsingGlobal() ? 0 : 1);
|
||||
ui->fps_cap->setEnabled(!Settings::values.fps_cap.UsingGlobal());
|
||||
ConfigurationShared::SetHighlight(ui->fps_cap_layout,
|
||||
!Settings::values.fps_cap.UsingGlobal());
|
||||
}
|
||||
}
|
||||
|
||||
@ -102,8 +92,6 @@ void ConfigureGeneral::ApplyConfiguration() {
|
||||
UISettings::values.mute_when_in_background = ui->toggle_background_mute->isChecked();
|
||||
UISettings::values.hide_mouse = ui->toggle_hide_mouse->isChecked();
|
||||
|
||||
Settings::values.fps_cap.SetValue(ui->fps_cap->value());
|
||||
|
||||
// Guard if during game and set to game-specific value
|
||||
if (Settings::values.use_speed_limit.UsingGlobal()) {
|
||||
Settings::values.use_speed_limit.SetValue(ui->toggle_speed_limit->checkState() ==
|
||||
@ -119,13 +107,6 @@ void ConfigureGeneral::ApplyConfiguration() {
|
||||
Qt::Checked);
|
||||
Settings::values.speed_limit.SetValue(ui->speed_limit->value());
|
||||
}
|
||||
|
||||
if (ui->fps_cap_combobox->currentIndex() == ConfigurationShared::USE_GLOBAL_INDEX) {
|
||||
Settings::values.fps_cap.SetGlobal(true);
|
||||
} else {
|
||||
Settings::values.fps_cap.SetGlobal(false);
|
||||
Settings::values.fps_cap.SetValue(ui->fps_cap->value());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,9 +152,4 @@ void ConfigureGeneral::SetupPerGameUI() {
|
||||
ui->speed_limit->setEnabled(ui->toggle_speed_limit->isChecked() &&
|
||||
(use_speed_limit != ConfigurationShared::CheckState::Global));
|
||||
});
|
||||
|
||||
connect(ui->fps_cap_combobox, qOverload<int>(&QComboBox::activated), this, [this](int index) {
|
||||
ui->fps_cap->setEnabled(index == 1);
|
||||
ConfigurationShared::SetHighlight(ui->fps_cap_layout, index == 1);
|
||||
});
|
||||
}
|
||||
|
@ -27,87 +27,6 @@
|
||||
<layout class="QHBoxLayout" name="GeneralHorizontalLayout">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="GeneralVerticalLayout">
|
||||
<item>
|
||||
<widget class="QWidget" name="fps_cap_layout" native="true">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout" stretch="1,1">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QComboBox" name="fps_cap_combobox">
|
||||
<property name="currentText">
|
||||
<string>Use global framerate cap</string>
|
||||
</property>
|
||||
<property name="currentIndex">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Use global framerate cap</string>
|
||||
</property>
|
||||
</item>
|
||||
<item>
|
||||
<property name="text">
|
||||
<string>Set framerate cap:</string>
|
||||
</property>
|
||||
</item>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="fps_cap_label">
|
||||
<property name="toolTip">
|
||||
<string>Requires the use of the FPS Limiter Toggle hotkey to take effect.</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Framerate Cap</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="fps_cap">
|
||||
<property name="suffix">
|
||||
<string>x</string>
|
||||
</property>
|
||||
<property name="minimum">
|
||||
<number>1</number>
|
||||
</property>
|
||||
<property name="maximum">
|
||||
<number>1000</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>500</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
|
@ -1059,7 +1059,7 @@ void GMainWindow::InitializeHotkeys() {
|
||||
Settings::values.volume.SetValue(static_cast<u8>(new_volume));
|
||||
});
|
||||
connect_shortcut(QStringLiteral("Toggle Framerate Limit"), [] {
|
||||
Settings::values.disable_fps_limit.SetValue(!Settings::values.disable_fps_limit.GetValue());
|
||||
Settings::values.use_speed_limit.SetValue(!Settings::values.use_speed_limit.GetValue());
|
||||
});
|
||||
connect_shortcut(QStringLiteral("Toggle Mouse Panning"), [&] {
|
||||
Settings::values.mouse_panning = !Settings::values.mouse_panning;
|
||||
@ -1483,9 +1483,6 @@ void GMainWindow::BootGame(const QString& filename, u64 program_id, std::size_t
|
||||
Config per_game_config(*system, config_file_name, Config::ConfigType::PerGameConfig);
|
||||
}
|
||||
|
||||
// Disable fps limit toggle when booting a new title
|
||||
Settings::values.disable_fps_limit.SetValue(false);
|
||||
|
||||
// Save configurations
|
||||
UpdateUISettings();
|
||||
game_list->SaveInterfaceLayout();
|
||||
@ -3277,7 +3274,7 @@ void GMainWindow::UpdateStatusBar() {
|
||||
} else {
|
||||
emu_speed_label->setText(tr("Speed: %1%").arg(results.emulation_speed * 100.0, 0, 'f', 0));
|
||||
}
|
||||
if (Settings::values.disable_fps_limit) {
|
||||
if (!Settings::values.use_speed_limit) {
|
||||
game_fps_label->setText(
|
||||
tr("Game: %1 FPS (Unlocked)").arg(results.average_game_fps, 0, 'f', 0));
|
||||
} else {
|
||||
|
Reference in New Issue
Block a user