diff options
| author | 2020-06-16 14:12:17 -0400 | |
|---|---|---|
| committer | 2020-06-16 14:12:17 -0400 | |
| commit | f22d02083c0ec7627673c9ae021463e2ab8f07bd (patch) | |
| tree | c50714fa1aa25fc7a367539547bacd47fe73a605 /src | |
| parent | Merge pull request #4091 from MerryMage/cmakelists-xbyak-order (diff) | |
| parent | yuzu/frontend: Remove internal resolution option (diff) | |
| download | yuzu-f22d02083c0ec7627673c9ae021463e2ab8f07bd.tar.gz yuzu-f22d02083c0ec7627673c9ae021463e2ab8f07bd.tar.xz yuzu-f22d02083c0ec7627673c9ae021463e2ab8f07bd.zip | |
Merge pull request #3966 from Morph1984/hide-internal-resolution-ui
yuzu/frontend: Remove internal resolution option
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/settings.h | 2 | ||||
| -rw-r--r-- | src/yuzu/configuration/config.cpp | 10 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_graphics.cpp | 45 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_graphics.ui | 40 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 5 | ||||
| -rw-r--r-- | src/yuzu_cmd/config.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu_cmd/default_ini.h | 5 | ||||
| -rw-r--r-- | src/yuzu_tester/config.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu_tester/default_ini.h | 5 |
9 files changed, 3 insertions, 113 deletions
diff --git a/src/core/settings.h b/src/core/settings.h index 36cd66fd4..33e1e06cd 100644 --- a/src/core/settings.h +++ b/src/core/settings.h | |||
| @@ -437,7 +437,7 @@ struct Values { | |||
| 437 | bool renderer_debug; | 437 | bool renderer_debug; |
| 438 | int vulkan_device; | 438 | int vulkan_device; |
| 439 | 439 | ||
| 440 | float resolution_factor; | 440 | u16 resolution_factor{1}; |
| 441 | int aspect_ratio; | 441 | int aspect_ratio; |
| 442 | int max_anisotropy; | 442 | int max_anisotropy; |
| 443 | bool use_frame_limit; | 443 | bool use_frame_limit; |
diff --git a/src/yuzu/configuration/config.cpp b/src/yuzu/configuration/config.cpp index 7e9073cc3..32c81dc70 100644 --- a/src/yuzu/configuration/config.cpp +++ b/src/yuzu/configuration/config.cpp | |||
| @@ -631,13 +631,11 @@ void Config::ReadRendererValues() { | |||
| 631 | static_cast<Settings::RendererBackend>(ReadSetting(QStringLiteral("backend"), 0).toInt()); | 631 | static_cast<Settings::RendererBackend>(ReadSetting(QStringLiteral("backend"), 0).toInt()); |
| 632 | Settings::values.renderer_debug = ReadSetting(QStringLiteral("debug"), false).toBool(); | 632 | Settings::values.renderer_debug = ReadSetting(QStringLiteral("debug"), false).toBool(); |
| 633 | Settings::values.vulkan_device = ReadSetting(QStringLiteral("vulkan_device"), 0).toInt(); | 633 | Settings::values.vulkan_device = ReadSetting(QStringLiteral("vulkan_device"), 0).toInt(); |
| 634 | Settings::values.resolution_factor = | ||
| 635 | ReadSetting(QStringLiteral("resolution_factor"), 1.0).toFloat(); | ||
| 636 | Settings::values.aspect_ratio = ReadSetting(QStringLiteral("aspect_ratio"), 0).toInt(); | 634 | Settings::values.aspect_ratio = ReadSetting(QStringLiteral("aspect_ratio"), 0).toInt(); |
| 637 | Settings::values.max_anisotropy = ReadSetting(QStringLiteral("max_anisotropy"), 0).toInt(); | 635 | Settings::values.max_anisotropy = ReadSetting(QStringLiteral("max_anisotropy"), 0).toInt(); |
| 638 | Settings::values.use_frame_limit = | 636 | Settings::values.use_frame_limit = |
| 639 | ReadSetting(QStringLiteral("use_frame_limit"), true).toBool(); | 637 | ReadSetting(QStringLiteral("use_frame_limit"), true).toBool(); |
| 640 | Settings::values.frame_limit = ReadSetting(QStringLiteral("frame_limit"), 100).toInt(); | 638 | Settings::values.frame_limit = ReadSetting(QStringLiteral("frame_limit"), 100).toUInt(); |
| 641 | Settings::values.use_disk_shader_cache = | 639 | Settings::values.use_disk_shader_cache = |
| 642 | ReadSetting(QStringLiteral("use_disk_shader_cache"), true).toBool(); | 640 | ReadSetting(QStringLiteral("use_disk_shader_cache"), true).toBool(); |
| 643 | const int gpu_accuracy_level = ReadSetting(QStringLiteral("gpu_accuracy"), 0).toInt(); | 641 | const int gpu_accuracy_level = ReadSetting(QStringLiteral("gpu_accuracy"), 0).toInt(); |
| @@ -722,8 +720,6 @@ void Config::ReadUIValues() { | |||
| 722 | .toString(); | 720 | .toString(); |
| 723 | UISettings::values.enable_discord_presence = | 721 | UISettings::values.enable_discord_presence = |
| 724 | ReadSetting(QStringLiteral("enable_discord_presence"), true).toBool(); | 722 | ReadSetting(QStringLiteral("enable_discord_presence"), true).toBool(); |
| 725 | UISettings::values.screenshot_resolution_factor = | ||
| 726 | static_cast<u16>(ReadSetting(QStringLiteral("screenshot_resolution_factor"), 0).toUInt()); | ||
| 727 | UISettings::values.select_user_on_boot = | 723 | UISettings::values.select_user_on_boot = |
| 728 | ReadSetting(QStringLiteral("select_user_on_boot"), false).toBool(); | 724 | ReadSetting(QStringLiteral("select_user_on_boot"), false).toBool(); |
| 729 | 725 | ||
| @@ -1082,8 +1078,6 @@ void Config::SaveRendererValues() { | |||
| 1082 | WriteSetting(QStringLiteral("backend"), static_cast<int>(Settings::values.renderer_backend), 0); | 1078 | WriteSetting(QStringLiteral("backend"), static_cast<int>(Settings::values.renderer_backend), 0); |
| 1083 | WriteSetting(QStringLiteral("debug"), Settings::values.renderer_debug, false); | 1079 | WriteSetting(QStringLiteral("debug"), Settings::values.renderer_debug, false); |
| 1084 | WriteSetting(QStringLiteral("vulkan_device"), Settings::values.vulkan_device, 0); | 1080 | WriteSetting(QStringLiteral("vulkan_device"), Settings::values.vulkan_device, 0); |
| 1085 | WriteSetting(QStringLiteral("resolution_factor"), | ||
| 1086 | static_cast<double>(Settings::values.resolution_factor), 1.0); | ||
| 1087 | WriteSetting(QStringLiteral("aspect_ratio"), Settings::values.aspect_ratio, 0); | 1081 | WriteSetting(QStringLiteral("aspect_ratio"), Settings::values.aspect_ratio, 0); |
| 1088 | WriteSetting(QStringLiteral("max_anisotropy"), Settings::values.max_anisotropy, 0); | 1082 | WriteSetting(QStringLiteral("max_anisotropy"), Settings::values.max_anisotropy, 0); |
| 1089 | WriteSetting(QStringLiteral("use_frame_limit"), Settings::values.use_frame_limit, true); | 1083 | WriteSetting(QStringLiteral("use_frame_limit"), Settings::values.use_frame_limit, true); |
| @@ -1159,8 +1153,6 @@ void Config::SaveUIValues() { | |||
| 1159 | QString::fromUtf8(UISettings::themes[0].second)); | 1153 | QString::fromUtf8(UISettings::themes[0].second)); |
| 1160 | WriteSetting(QStringLiteral("enable_discord_presence"), | 1154 | WriteSetting(QStringLiteral("enable_discord_presence"), |
| 1161 | UISettings::values.enable_discord_presence, true); | 1155 | UISettings::values.enable_discord_presence, true); |
| 1162 | WriteSetting(QStringLiteral("screenshot_resolution_factor"), | ||
| 1163 | UISettings::values.screenshot_resolution_factor, 0); | ||
| 1164 | WriteSetting(QStringLiteral("select_user_on_boot"), UISettings::values.select_user_on_boot, | 1156 | WriteSetting(QStringLiteral("select_user_on_boot"), UISettings::values.select_user_on_boot, |
| 1165 | false); | 1157 | false); |
| 1166 | 1158 | ||
diff --git a/src/yuzu/configuration/configure_graphics.cpp b/src/yuzu/configuration/configure_graphics.cpp index ea667caef..304625cd7 100644 --- a/src/yuzu/configuration/configure_graphics.cpp +++ b/src/yuzu/configuration/configure_graphics.cpp | |||
| @@ -19,47 +19,6 @@ | |||
| 19 | #include "video_core/renderer_vulkan/renderer_vulkan.h" | 19 | #include "video_core/renderer_vulkan/renderer_vulkan.h" |
| 20 | #endif | 20 | #endif |
| 21 | 21 | ||
| 22 | namespace { | ||
| 23 | enum class Resolution : int { | ||
| 24 | Auto, | ||
| 25 | Scale1x, | ||
| 26 | Scale2x, | ||
| 27 | Scale3x, | ||
| 28 | Scale4x, | ||
| 29 | }; | ||
| 30 | |||
| 31 | float ToResolutionFactor(Resolution option) { | ||
| 32 | switch (option) { | ||
| 33 | case Resolution::Auto: | ||
| 34 | return 0.f; | ||
| 35 | case Resolution::Scale1x: | ||
| 36 | return 1.f; | ||
| 37 | case Resolution::Scale2x: | ||
| 38 | return 2.f; | ||
| 39 | case Resolution::Scale3x: | ||
| 40 | return 3.f; | ||
| 41 | case Resolution::Scale4x: | ||
| 42 | return 4.f; | ||
| 43 | } | ||
| 44 | return 0.f; | ||
| 45 | } | ||
| 46 | |||
| 47 | Resolution FromResolutionFactor(float factor) { | ||
| 48 | if (factor == 0.f) { | ||
| 49 | return Resolution::Auto; | ||
| 50 | } else if (factor == 1.f) { | ||
| 51 | return Resolution::Scale1x; | ||
| 52 | } else if (factor == 2.f) { | ||
| 53 | return Resolution::Scale2x; | ||
| 54 | } else if (factor == 3.f) { | ||
| 55 | return Resolution::Scale3x; | ||
| 56 | } else if (factor == 4.f) { | ||
| 57 | return Resolution::Scale4x; | ||
| 58 | } | ||
| 59 | return Resolution::Auto; | ||
| 60 | } | ||
| 61 | } // Anonymous namespace | ||
| 62 | |||
| 63 | ConfigureGraphics::ConfigureGraphics(QWidget* parent) | 22 | ConfigureGraphics::ConfigureGraphics(QWidget* parent) |
| 64 | : QWidget(parent), ui(new Ui::ConfigureGraphics) { | 23 | : QWidget(parent), ui(new Ui::ConfigureGraphics) { |
| 65 | vulkan_device = Settings::values.vulkan_device; | 24 | vulkan_device = Settings::values.vulkan_device; |
| @@ -99,8 +58,6 @@ void ConfigureGraphics::SetConfiguration() { | |||
| 99 | 58 | ||
| 100 | ui->api->setEnabled(runtime_lock); | 59 | ui->api->setEnabled(runtime_lock); |
| 101 | ui->api->setCurrentIndex(static_cast<int>(Settings::values.renderer_backend)); | 60 | ui->api->setCurrentIndex(static_cast<int>(Settings::values.renderer_backend)); |
| 102 | ui->resolution_factor_combobox->setCurrentIndex( | ||
| 103 | static_cast<int>(FromResolutionFactor(Settings::values.resolution_factor))); | ||
| 104 | ui->aspect_ratio_combobox->setCurrentIndex(Settings::values.aspect_ratio); | 61 | ui->aspect_ratio_combobox->setCurrentIndex(Settings::values.aspect_ratio); |
| 105 | ui->use_disk_shader_cache->setEnabled(runtime_lock); | 62 | ui->use_disk_shader_cache->setEnabled(runtime_lock); |
| 106 | ui->use_disk_shader_cache->setChecked(Settings::values.use_disk_shader_cache); | 63 | ui->use_disk_shader_cache->setChecked(Settings::values.use_disk_shader_cache); |
| @@ -114,8 +71,6 @@ void ConfigureGraphics::SetConfiguration() { | |||
| 114 | void ConfigureGraphics::ApplyConfiguration() { | 71 | void ConfigureGraphics::ApplyConfiguration() { |
| 115 | Settings::values.renderer_backend = GetCurrentGraphicsBackend(); | 72 | Settings::values.renderer_backend = GetCurrentGraphicsBackend(); |
| 116 | Settings::values.vulkan_device = vulkan_device; | 73 | Settings::values.vulkan_device = vulkan_device; |
| 117 | Settings::values.resolution_factor = | ||
| 118 | ToResolutionFactor(static_cast<Resolution>(ui->resolution_factor_combobox->currentIndex())); | ||
| 119 | Settings::values.aspect_ratio = ui->aspect_ratio_combobox->currentIndex(); | 74 | Settings::values.aspect_ratio = ui->aspect_ratio_combobox->currentIndex(); |
| 120 | Settings::values.use_disk_shader_cache = ui->use_disk_shader_cache->isChecked(); | 75 | Settings::values.use_disk_shader_cache = ui->use_disk_shader_cache->isChecked(); |
| 121 | Settings::values.use_asynchronous_gpu_emulation = | 76 | Settings::values.use_asynchronous_gpu_emulation = |
diff --git a/src/yuzu/configuration/configure_graphics.ui b/src/yuzu/configuration/configure_graphics.ui index c816d6108..6e75447a5 100644 --- a/src/yuzu/configuration/configure_graphics.ui +++ b/src/yuzu/configuration/configure_graphics.ui | |||
| @@ -85,46 +85,6 @@ | |||
| 85 | </widget> | 85 | </widget> |
| 86 | </item> | 86 | </item> |
| 87 | <item> | 87 | <item> |
| 88 | <layout class="QHBoxLayout" name="horizontalLayout_2"> | ||
| 89 | <item> | ||
| 90 | <widget class="QLabel" name="label"> | ||
| 91 | <property name="text"> | ||
| 92 | <string>Internal Resolution:</string> | ||
| 93 | </property> | ||
| 94 | </widget> | ||
| 95 | </item> | ||
| 96 | <item> | ||
| 97 | <widget class="QComboBox" name="resolution_factor_combobox"> | ||
| 98 | <item> | ||
| 99 | <property name="text"> | ||
| 100 | <string>Auto (Window Size)</string> | ||
| 101 | </property> | ||
| 102 | </item> | ||
| 103 | <item> | ||
| 104 | <property name="text"> | ||
| 105 | <string>Native (1280x720)</string> | ||
| 106 | </property> | ||
| 107 | </item> | ||
| 108 | <item> | ||
| 109 | <property name="text"> | ||
| 110 | <string>2x Native (2560x1440)</string> | ||
| 111 | </property> | ||
| 112 | </item> | ||
| 113 | <item> | ||
| 114 | <property name="text"> | ||
| 115 | <string>3x Native (3840x2160)</string> | ||
| 116 | </property> | ||
| 117 | </item> | ||
| 118 | <item> | ||
| 119 | <property name="text"> | ||
| 120 | <string>4x Native (5120x2880)</string> | ||
| 121 | </property> | ||
| 122 | </item> | ||
| 123 | </widget> | ||
| 124 | </item> | ||
| 125 | </layout> | ||
| 126 | </item> | ||
| 127 | <item> | ||
| 128 | <layout class="QHBoxLayout" name="horizontalLayout_6"> | 88 | <layout class="QHBoxLayout" name="horizontalLayout_6"> |
| 129 | <item> | 89 | <item> |
| 130 | <widget class="QLabel" name="ar_label"> | 90 | <widget class="QLabel" name="ar_label"> |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 270cccc77..4119d7907 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -689,10 +689,7 @@ void GMainWindow::InitializeHotkeys() { | |||
| 689 | Settings::values.use_frame_limit = !Settings::values.use_frame_limit; | 689 | Settings::values.use_frame_limit = !Settings::values.use_frame_limit; |
| 690 | UpdateStatusBar(); | 690 | UpdateStatusBar(); |
| 691 | }); | 691 | }); |
| 692 | // TODO: Remove this comment/static whenever the next major release of | 692 | constexpr u16 SPEED_LIMIT_STEP = 5; |
| 693 | // MSVC occurs and we make it a requirement (see: | ||
| 694 | // https://developercommunity.visualstudio.com/content/problem/93922/constexprs-are-trying-to-be-captured-in-lambda-fun.html) | ||
| 695 | static constexpr u16 SPEED_LIMIT_STEP = 5; | ||
| 696 | connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Increase Speed Limit"), this), | 693 | connect(hotkey_registry.GetHotkey(main_window, QStringLiteral("Increase Speed Limit"), this), |
| 697 | &QShortcut::activated, this, [&] { | 694 | &QShortcut::activated, this, [&] { |
| 698 | if (Settings::values.frame_limit < 9999 - SPEED_LIMIT_STEP) { | 695 | if (Settings::values.frame_limit < 9999 - SPEED_LIMIT_STEP) { |
diff --git a/src/yuzu_cmd/config.cpp b/src/yuzu_cmd/config.cpp index 7240270f5..659b9f701 100644 --- a/src/yuzu_cmd/config.cpp +++ b/src/yuzu_cmd/config.cpp | |||
| @@ -380,8 +380,6 @@ void Config::ReadValues() { | |||
| 380 | Settings::values.renderer_debug = sdl2_config->GetBoolean("Renderer", "debug", false); | 380 | Settings::values.renderer_debug = sdl2_config->GetBoolean("Renderer", "debug", false); |
| 381 | Settings::values.vulkan_device = sdl2_config->GetInteger("Renderer", "vulkan_device", 0); | 381 | Settings::values.vulkan_device = sdl2_config->GetInteger("Renderer", "vulkan_device", 0); |
| 382 | 382 | ||
| 383 | Settings::values.resolution_factor = | ||
| 384 | static_cast<float>(sdl2_config->GetReal("Renderer", "resolution_factor", 1.0)); | ||
| 385 | Settings::values.aspect_ratio = | 383 | Settings::values.aspect_ratio = |
| 386 | static_cast<int>(sdl2_config->GetInteger("Renderer", "aspect_ratio", 0)); | 384 | static_cast<int>(sdl2_config->GetInteger("Renderer", "aspect_ratio", 0)); |
| 387 | Settings::values.max_anisotropy = | 385 | Settings::values.max_anisotropy = |
diff --git a/src/yuzu_cmd/default_ini.h b/src/yuzu_cmd/default_ini.h index 6f53e9659..45c07ed5d 100644 --- a/src/yuzu_cmd/default_ini.h +++ b/src/yuzu_cmd/default_ini.h | |||
| @@ -117,11 +117,6 @@ use_hw_renderer = | |||
| 117 | # 0: Interpreter (slow), 1 (default): JIT (fast) | 117 | # 0: Interpreter (slow), 1 (default): JIT (fast) |
| 118 | use_shader_jit = | 118 | use_shader_jit = |
| 119 | 119 | ||
| 120 | # Resolution scale factor | ||
| 121 | # 0: Auto (scales resolution to window size), 1: Native Switch screen resolution, Otherwise a scale | ||
| 122 | # factor for the Switch resolution | ||
| 123 | resolution_factor = | ||
| 124 | |||
| 125 | # Aspect ratio | 120 | # Aspect ratio |
| 126 | # 0: Default (16:9), 1: Force 4:3, 2: Force 21:9, 3: Stretch to Window | 121 | # 0: Default (16:9), 1: Force 4:3, 2: Force 21:9, 3: Stretch to Window |
| 127 | aspect_ratio = | 122 | aspect_ratio = |
diff --git a/src/yuzu_tester/config.cpp b/src/yuzu_tester/config.cpp index 3be58b15d..1566c2e3f 100644 --- a/src/yuzu_tester/config.cpp +++ b/src/yuzu_tester/config.cpp | |||
| @@ -116,8 +116,6 @@ void Config::ReadValues() { | |||
| 116 | Settings::values.use_multi_core = sdl2_config->GetBoolean("Core", "use_multi_core", false); | 116 | Settings::values.use_multi_core = sdl2_config->GetBoolean("Core", "use_multi_core", false); |
| 117 | 117 | ||
| 118 | // Renderer | 118 | // Renderer |
| 119 | Settings::values.resolution_factor = | ||
| 120 | static_cast<float>(sdl2_config->GetReal("Renderer", "resolution_factor", 1.0)); | ||
| 121 | Settings::values.aspect_ratio = | 119 | Settings::values.aspect_ratio = |
| 122 | static_cast<int>(sdl2_config->GetInteger("Renderer", "aspect_ratio", 0)); | 120 | static_cast<int>(sdl2_config->GetInteger("Renderer", "aspect_ratio", 0)); |
| 123 | Settings::values.max_anisotropy = | 121 | Settings::values.max_anisotropy = |
diff --git a/src/yuzu_tester/default_ini.h b/src/yuzu_tester/default_ini.h index ca203b64d..41bbbbf60 100644 --- a/src/yuzu_tester/default_ini.h +++ b/src/yuzu_tester/default_ini.h | |||
| @@ -21,11 +21,6 @@ use_hw_renderer = | |||
| 21 | # 0: Interpreter (slow), 1 (default): JIT (fast) | 21 | # 0: Interpreter (slow), 1 (default): JIT (fast) |
| 22 | use_shader_jit = | 22 | use_shader_jit = |
| 23 | 23 | ||
| 24 | # Resolution scale factor | ||
| 25 | # 0: Auto (scales resolution to window size), 1: Native Switch screen resolution, Otherwise a scale | ||
| 26 | # factor for the Switch resolution | ||
| 27 | resolution_factor = | ||
| 28 | |||
| 29 | # Aspect ratio | 24 | # Aspect ratio |
| 30 | # 0: Default (16:9), 1: Force 4:3, 2: Force 21:9, 3: Stretch to Window | 25 | # 0: Default (16:9), 1: Force 4:3, 2: Force 21:9, 3: Stretch to Window |
| 31 | aspect_ratio = | 26 | aspect_ratio = |