diff options
| -rw-r--r-- | src/core/settings.cpp | 1 | ||||
| -rw-r--r-- | src/core/settings.h | 1 | ||||
| -rw-r--r-- | src/core/telemetry_session.cpp | 1 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_graphics.cpp | 3 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_graphics.ui | 10 | ||||
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu_cmd/default_ini.h | 5 |
8 files changed, 25 insertions, 0 deletions
diff --git a/src/core/settings.cpp b/src/core/settings.cpp index d1fc94060..7c0303684 100644 --- a/src/core/settings.cpp +++ b/src/core/settings.cpp | |||
| @@ -94,6 +94,7 @@ void LogSettings() { | |||
| 94 | LogSetting("Renderer_UseAccurateGpuEmulation", Settings::values.use_accurate_gpu_emulation); | 94 | LogSetting("Renderer_UseAccurateGpuEmulation", Settings::values.use_accurate_gpu_emulation); |
| 95 | LogSetting("Renderer_UseAsynchronousGpuEmulation", | 95 | LogSetting("Renderer_UseAsynchronousGpuEmulation", |
| 96 | Settings::values.use_asynchronous_gpu_emulation); | 96 | Settings::values.use_asynchronous_gpu_emulation); |
| 97 | LogSetting("Renderer_UseVsync", Settings::values.use_vsync); | ||
| 97 | LogSetting("Audio_OutputEngine", Settings::values.sink_id); | 98 | LogSetting("Audio_OutputEngine", Settings::values.sink_id); |
| 98 | LogSetting("Audio_EnableAudioStretching", Settings::values.enable_audio_stretching); | 99 | LogSetting("Audio_EnableAudioStretching", Settings::values.enable_audio_stretching); |
| 99 | LogSetting("Audio_OutputDevice", Settings::values.audio_device_id); | 100 | LogSetting("Audio_OutputDevice", Settings::values.audio_device_id); |
diff --git a/src/core/settings.h b/src/core/settings.h index f837d3fbc..15b691342 100644 --- a/src/core/settings.h +++ b/src/core/settings.h | |||
| @@ -435,6 +435,7 @@ struct Values { | |||
| 435 | bool use_disk_shader_cache; | 435 | bool use_disk_shader_cache; |
| 436 | bool use_accurate_gpu_emulation; | 436 | bool use_accurate_gpu_emulation; |
| 437 | bool use_asynchronous_gpu_emulation; | 437 | bool use_asynchronous_gpu_emulation; |
| 438 | bool use_vsync; | ||
| 438 | bool force_30fps_mode; | 439 | bool force_30fps_mode; |
| 439 | 440 | ||
| 440 | float bg_red; | 441 | float bg_red; |
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 0e72d31cd..0f3685d1c 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp | |||
| @@ -188,6 +188,7 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader) { | |||
| 188 | Settings::values.use_accurate_gpu_emulation); | 188 | Settings::values.use_accurate_gpu_emulation); |
| 189 | AddField(field_type, "Renderer_UseAsynchronousGpuEmulation", | 189 | AddField(field_type, "Renderer_UseAsynchronousGpuEmulation", |
| 190 | Settings::values.use_asynchronous_gpu_emulation); | 190 | Settings::values.use_asynchronous_gpu_emulation); |
| 191 | AddField(field_type, "Renderer_UseVsync", Settings::values.use_vsync); | ||
| 191 | AddField(field_type, "System_UseDockedMode", Settings::values.use_docked_mode); | 192 | AddField(field_type, "System_UseDockedMode", Settings::values.use_docked_mode); |
| 192 | } | 193 | } |
| 193 | 194 | ||
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 6209fff75..d0f574147 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -640,6 +640,7 @@ void Config::ReadRendererValues() { | |||
| 640 | ReadSetting(QStringLiteral("use_accurate_gpu_emulation"), false).toBool(); | 640 | ReadSetting(QStringLiteral("use_accurate_gpu_emulation"), false).toBool(); |
| 641 | Settings::values.use_asynchronous_gpu_emulation = | 641 | Settings::values.use_asynchronous_gpu_emulation = |
| 642 | ReadSetting(QStringLiteral("use_asynchronous_gpu_emulation"), false).toBool(); | 642 | ReadSetting(QStringLiteral("use_asynchronous_gpu_emulation"), false).toBool(); |
| 643 | Settings::values.use_vsync = ReadSetting(QStringLiteral("use_vsync"), true).toBool(); | ||
| 643 | Settings::values.force_30fps_mode = | 644 | Settings::values.force_30fps_mode = |
| 644 | ReadSetting(QStringLiteral("force_30fps_mode"), false).toBool(); | 645 | ReadSetting(QStringLiteral("force_30fps_mode"), false).toBool(); |
| 645 | 646 | ||
| @@ -1074,6 +1075,7 @@ void Config::SaveRendererValues() { | |||
| 1074 | Settings::values.use_accurate_gpu_emulation, false); | 1075 | Settings::values.use_accurate_gpu_emulation, false); |
| 1075 | WriteSetting(QStringLiteral("use_asynchronous_gpu_emulation"), | 1076 | WriteSetting(QStringLiteral("use_asynchronous_gpu_emulation"), |
| 1076 | Settings::values.use_asynchronous_gpu_emulation, false); | 1077 | Settings::values.use_asynchronous_gpu_emulation, false); |
| 1078 | WriteSetting(QStringLiteral("use_vsync"), Settings::values.use_vsync, true); | ||
| 1077 | WriteSetting(QStringLiteral("force_30fps_mode"), Settings::values.force_30fps_mode, false); | 1079 | WriteSetting(QStringLiteral("force_30fps_mode"), Settings::values.force_30fps_mode, false); |
| 1078 | 1080 | ||
| 1079 | // Cast to double because Qt's written float values are not human-readable | 1081 | // Cast to double because Qt's written float values are not human-readable |
diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index ea899c080..fe64c7d81 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp | |||
| @@ -103,6 +103,8 @@ void ConfigureGraphics::SetConfiguration() { | |||
| 103 | ui->use_accurate_gpu_emulation->setChecked(Settings::values.use_accurate_gpu_emulation); | 103 | ui->use_accurate_gpu_emulation->setChecked(Settings::values.use_accurate_gpu_emulation); |
| 104 | ui->use_asynchronous_gpu_emulation->setEnabled(runtime_lock); | 104 | ui->use_asynchronous_gpu_emulation->setEnabled(runtime_lock); |
| 105 | ui->use_asynchronous_gpu_emulation->setChecked(Settings::values.use_asynchronous_gpu_emulation); | 105 | ui->use_asynchronous_gpu_emulation->setChecked(Settings::values.use_asynchronous_gpu_emulation); |
| 106 | ui->use_vsync->setEnabled(runtime_lock); | ||
| 107 | ui->use_vsync->setChecked(Settings::values.use_vsync); | ||
| 106 | ui->force_30fps_mode->setEnabled(runtime_lock); | 108 | ui->force_30fps_mode->setEnabled(runtime_lock); |
| 107 | ui->force_30fps_mode->setChecked(Settings::values.force_30fps_mode); | 109 | ui->force_30fps_mode->setChecked(Settings::values.force_30fps_mode); |
| 108 | UpdateBackgroundColorButton(QColor::fromRgbF(Settings::values.bg_red, Settings::values.bg_green, | 110 | UpdateBackgroundColorButton(QColor::fromRgbF(Settings::values.bg_red, Settings::values.bg_green, |
| @@ -120,6 +122,7 @@ void ConfigureGraphics::ApplyConfiguration() { | |||
| 120 | Settings::values.use_accurate_gpu_emulation = ui->use_accurate_gpu_emulation->isChecked(); | 122 | Settings::values.use_accurate_gpu_emulation = ui->use_accurate_gpu_emulation->isChecked(); |
| 121 | Settings::values.use_asynchronous_gpu_emulation = | 123 | Settings::values.use_asynchronous_gpu_emulation = |
| 122 | ui->use_asynchronous_gpu_emulation->isChecked(); | 124 | ui->use_asynchronous_gpu_emulation->isChecked(); |
| 125 | Settings::values.use_vsync = ui->use_vsync->isChecked(); | ||
| 123 | Settings::values.force_30fps_mode = ui->force_30fps_mode->isChecked(); | 126 | Settings::values.force_30fps_mode = ui->force_30fps_mode->isChecked(); |
| 124 | Settings::values.bg_red = static_cast<float>(bg_color.redF()); | 127 | Settings::values.bg_red = static_cast<float>(bg_color.redF()); |
| 125 | Settings::values.bg_green = static_cast<float>(bg_color.greenF()); | 128 | Settings::values.bg_green = static_cast<float>(bg_color.greenF()); |
diff --git a/src/yuzu/configuration/configure_graphics.ui b/src/yuzu/configuration/configure_graphics.ui index db60426ab..9acc7dd93 100644 --- a/src/yuzu/configuration/configure_graphics.ui +++ b/src/yuzu/configuration/configure_graphics.ui | |||
| @@ -85,6 +85,16 @@ | |||
| 85 | </widget> | 85 | </widget> |
| 86 | </item> | 86 | </item> |
| 87 | <item> | 87 | <item> |
| 88 | <widget class="QCheckBox" name="use_vsync"> | ||
| 89 | <property name="toolTip"> | ||
| 90 | <string>VSync prevents the screen from tearing, but some graphics cards have lower performance with VSync enabled. Keep it enabled if you don't notice a performance difference.</string> | ||
| 91 | </property> | ||
| 92 | <property name="text"> | ||
| 93 | <string>Use VSync (OpenGL only)</string> | ||
| 94 | </property> | ||
| 95 | </widget> | ||
| 96 | </item> | ||
| 97 | <item> | ||
| 88 | <widget class="QCheckBox" name="use_accurate_gpu_emulation"> | 98 | <widget class="QCheckBox" name="use_accurate_gpu_emulation"> |
| 89 | <property name="text"> | 99 | <property name="text"> |
| 90 | <string>Use accurate GPU emulation (slow)</string> | 100 | <string>Use accurate GPU emulation (slow)</string> |
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 96f1ce3af..b77c12baf 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -390,6 +390,8 @@ void Config::ReadValues() { | |||
| 390 | sdl2_config->GetBoolean("Renderer", "use_accurate_gpu_emulation", false); | 390 | sdl2_config->GetBoolean("Renderer", "use_accurate_gpu_emulation", false); |
| 391 | Settings::values.use_asynchronous_gpu_emulation = | 391 | Settings::values.use_asynchronous_gpu_emulation = |
| 392 | sdl2_config->GetBoolean("Renderer", "use_asynchronous_gpu_emulation", false); | 392 | sdl2_config->GetBoolean("Renderer", "use_asynchronous_gpu_emulation", false); |
| 393 | Settings::values.use_vsync = | ||
| 394 | static_cast<u16>(sdl2_config->GetInteger("Renderer", "use_vsync", 1)); | ||
| 393 | 395 | ||
| 394 | Settings::values.bg_red = static_cast<float>(sdl2_config->GetReal("Renderer", "bg_red", 0.0)); | 396 | Settings::values.bg_red = static_cast<float>(sdl2_config->GetReal("Renderer", "bg_red", 0.0)); |
| 395 | Settings::values.bg_green = | 397 | Settings::values.bg_green = |
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index 8a2b658cd..df7473858 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h | |||
| @@ -150,6 +150,11 @@ use_accurate_gpu_emulation = | |||
| 150 | # 0 : Off (slow), 1 (default): On (fast) | 150 | # 0 : Off (slow), 1 (default): On (fast) |
| 151 | use_asynchronous_gpu_emulation = | 151 | use_asynchronous_gpu_emulation = |
| 152 | 152 | ||
| 153 | # Forces VSync on the display thread. Usually doesn't impact performance, but on some drivers it can | ||
| 154 | # so only turn this off if you notice a speed difference. | ||
| 155 | # 0: Off, 1 (default): On | ||
| 156 | use_vsync = | ||
| 157 | |||
| 153 | # The clear color for the renderer. What shows up on the sides of the bottom screen. | 158 | # The clear color for the renderer. What shows up on the sides of the bottom screen. |
| 154 | # Must be in range of 0.0-1.0. Defaults to 1.0 for all. | 159 | # Must be in range of 0.0-1.0. Defaults to 1.0 for all. |
| 155 | bg_red = | 160 | bg_red = |