mirror of
https://github.com/yuzu-emu/yuzu-android.git
synced 2025-06-25 18:47:52 -05:00
config, nvflinger: Add FPS cap setting
Allows finer tuning of the FPS limit.
This commit is contained in:
@ -823,6 +823,7 @@ void Config::ReadRendererValues() {
|
||||
ReadGlobalSetting(Settings::values.bg_blue);
|
||||
|
||||
if (global) {
|
||||
ReadBasicSetting(Settings::values.fps_cap);
|
||||
ReadBasicSetting(Settings::values.renderer_debug);
|
||||
}
|
||||
|
||||
@ -1352,6 +1353,7 @@ void Config::SaveRendererValues() {
|
||||
WriteGlobalSetting(Settings::values.bg_blue);
|
||||
|
||||
if (global) {
|
||||
WriteBasicSetting(Settings::values.fps_cap);
|
||||
WriteBasicSetting(Settings::values.renderer_debug);
|
||||
}
|
||||
|
||||
|
@ -48,6 +48,8 @@ void ConfigureGeneral::SetConfiguration() {
|
||||
ui->toggle_frame_limit->setChecked(Settings::values.use_frame_limit.GetValue());
|
||||
ui->frame_limit->setValue(Settings::values.frame_limit.GetValue());
|
||||
|
||||
ui->fps_cap->setValue(Settings::values.fps_cap.GetValue());
|
||||
|
||||
ui->button_reset_defaults->setEnabled(runtime_lock);
|
||||
|
||||
if (Settings::IsConfiguringGlobal()) {
|
||||
@ -87,6 +89,8 @@ void ConfigureGeneral::ApplyConfiguration() {
|
||||
UISettings::values.pause_when_in_background = ui->toggle_background_pause->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_frame_limit.UsingGlobal()) {
|
||||
Settings::values.use_frame_limit.SetValue(ui->toggle_frame_limit->checkState() ==
|
||||
|
@ -51,6 +51,36 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<widget class="QLabel" name="fps_cap_label">
|
||||
<property name="text">
|
||||
<string>Framerate Cap</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Requires the use of the FPS Limiter Toggle hotkey to take effect.</string>
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="use_multi_core">
|
||||
<property name="text">
|
||||
|
Reference in New Issue
Block a user