diff options
| author | 2023-08-22 21:58:23 -0400 | |
|---|---|---|
| committer | 2023-08-22 21:58:23 -0400 | |
| commit | 3c45452fae7f33d0534c144c5f588ef98f0a1346 (patch) | |
| tree | 02ba43c8405ae2ca8b80940653cb558d0db6191a /src | |
| parent | settings: Add docked mode helper function (diff) | |
| download | yuzu-3c45452fae7f33d0534c144c5f588ef98f0a1346.tar.gz yuzu-3c45452fae7f33d0534c144c5f588ef98f0a1346.tar.xz yuzu-3c45452fae7f33d0534c144c5f588ef98f0a1346.zip | |
general: Use console mode helper across project
Diffstat (limited to 'src')
| -rw-r--r-- | src/core/frontend/applets/controller.cpp | 3 | ||||
| -rw-r--r-- | src/core/frontend/framebuffer_layout.cpp | 3 | ||||
| -rw-r--r-- | src/core/hle/service/am/am.cpp | 5 | ||||
| -rw-r--r-- | src/core/hle/service/apm/apm_controller.cpp | 4 | ||||
| -rw-r--r-- | src/core/hle/service/hid/controllers/gesture.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/hid/controllers/npad.cpp | 2 | ||||
| -rw-r--r-- | src/core/hle/service/vi/vi.cpp | 2 | ||||
| -rw-r--r-- | src/core/telemetry_session.cpp | 3 | ||||
| -rw-r--r-- | src/yuzu/applets/qt_controller.cpp | 20 | ||||
| -rw-r--r-- | src/yuzu/bootmanager.cpp | 5 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_input.cpp | 20 | ||||
| -rw-r--r-- | src/yuzu/configuration/configure_per_game.cpp | 5 | ||||
| -rw-r--r-- | src/yuzu/main.cpp | 9 |
13 files changed, 34 insertions, 49 deletions
diff --git a/src/core/frontend/applets/controller.cpp b/src/core/frontend/applets/controller.cpp index 4c0c5434c..27755cb58 100644 --- a/src/core/frontend/applets/controller.cpp +++ b/src/core/frontend/applets/controller.cpp | |||
| @@ -3,6 +3,7 @@ | |||
| 3 | 3 | ||
| 4 | #include "common/assert.h" | 4 | #include "common/assert.h" |
| 5 | #include "common/logging/log.h" | 5 | #include "common/logging/log.h" |
| 6 | #include "common/settings.h" | ||
| 6 | #include "common/settings_enums.h" | 7 | #include "common/settings_enums.h" |
| 7 | #include "core/frontend/applets/controller.h" | 8 | #include "core/frontend/applets/controller.h" |
| 8 | #include "core/hid/emulated_controller.h" | 9 | #include "core/hid/emulated_controller.h" |
| @@ -63,7 +64,7 @@ void DefaultControllerApplet::ReconfigureControllers(ReconfigureCallback callbac | |||
| 63 | controller->Connect(true); | 64 | controller->Connect(true); |
| 64 | } | 65 | } |
| 65 | } else if (index == 0 && parameters.enable_single_mode && parameters.allow_handheld && | 66 | } else if (index == 0 && parameters.enable_single_mode && parameters.allow_handheld && |
| 66 | Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Handheld) { | 67 | !Settings::IsDockedMode()) { |
| 67 | // We should *never* reach here under any normal circumstances. | 68 | // We should *never* reach here under any normal circumstances. |
| 68 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::Handheld); | 69 | controller->SetNpadStyleIndex(Core::HID::NpadStyleIndex::Handheld); |
| 69 | controller->Connect(true); | 70 | controller->Connect(true); |
diff --git a/src/core/frontend/framebuffer_layout.cpp b/src/core/frontend/framebuffer_layout.cpp index ae0a44f12..2590b20da 100644 --- a/src/core/frontend/framebuffer_layout.cpp +++ b/src/core/frontend/framebuffer_layout.cpp | |||
| @@ -50,8 +50,7 @@ FramebufferLayout DefaultFrameLayout(u32 width, u32 height) { | |||
| 50 | } | 50 | } |
| 51 | 51 | ||
| 52 | FramebufferLayout FrameLayoutFromResolutionScale(f32 res_scale) { | 52 | FramebufferLayout FrameLayoutFromResolutionScale(f32 res_scale) { |
| 53 | const bool is_docked = | 53 | const bool is_docked = Settings::IsDockedMode(); |
| 54 | Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked; | ||
| 55 | const u32 screen_width = is_docked ? ScreenDocked::Width : ScreenUndocked::Width; | 54 | const u32 screen_width = is_docked ? ScreenDocked::Width : ScreenUndocked::Width; |
| 56 | const u32 screen_height = is_docked ? ScreenDocked::Height : ScreenUndocked::Height; | 55 | const u32 screen_height = is_docked ? ScreenDocked::Height : ScreenUndocked::Height; |
| 57 | 56 | ||
diff --git a/src/core/hle/service/am/am.cpp b/src/core/hle/service/am/am.cpp index 81df91a2d..da33f0e44 100644 --- a/src/core/hle/service/am/am.cpp +++ b/src/core/hle/service/am/am.cpp | |||
| @@ -834,7 +834,7 @@ void ICommonStateGetter::GetDefaultDisplayResolution(HLERequestContext& ctx) { | |||
| 834 | IPC::ResponseBuilder rb{ctx, 4}; | 834 | IPC::ResponseBuilder rb{ctx, 4}; |
| 835 | rb.Push(ResultSuccess); | 835 | rb.Push(ResultSuccess); |
| 836 | 836 | ||
| 837 | if (Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked) { | 837 | if (Settings::IsDockedMode()) { |
| 838 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); | 838 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); |
| 839 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); | 839 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); |
| 840 | } else { | 840 | } else { |
| @@ -922,8 +922,7 @@ void IStorage::Open(HLERequestContext& ctx) { | |||
| 922 | } | 922 | } |
| 923 | 923 | ||
| 924 | void ICommonStateGetter::GetOperationMode(HLERequestContext& ctx) { | 924 | void ICommonStateGetter::GetOperationMode(HLERequestContext& ctx) { |
| 925 | const bool use_docked_mode{Settings::values.use_docked_mode.GetValue() == | 925 | const bool use_docked_mode{Settings::IsDockedMode()}; |
| 926 | Settings::ConsoleMode::Docked}; | ||
| 927 | LOG_DEBUG(Service_AM, "called, use_docked_mode={}", use_docked_mode); | 926 | LOG_DEBUG(Service_AM, "called, use_docked_mode={}", use_docked_mode); |
| 928 | 927 | ||
| 929 | IPC::ResponseBuilder rb{ctx, 3}; | 928 | IPC::ResponseBuilder rb{ctx, 3}; |
diff --git a/src/core/hle/service/apm/apm_controller.cpp b/src/core/hle/service/apm/apm_controller.cpp index 1656b2e73..4f1aa5cc2 100644 --- a/src/core/hle/service/apm/apm_controller.cpp +++ b/src/core/hle/service/apm/apm_controller.cpp | |||
| @@ -68,9 +68,7 @@ void Controller::SetFromCpuBoostMode(CpuBoostMode mode) { | |||
| 68 | } | 68 | } |
| 69 | 69 | ||
| 70 | PerformanceMode Controller::GetCurrentPerformanceMode() const { | 70 | PerformanceMode Controller::GetCurrentPerformanceMode() const { |
| 71 | return Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked | 71 | return Settings::IsDockedMode() ? PerformanceMode::Boost : PerformanceMode::Normal; |
| 72 | ? PerformanceMode::Boost | ||
| 73 | : PerformanceMode::Normal; | ||
| 74 | } | 72 | } |
| 75 | 73 | ||
| 76 | PerformanceConfiguration Controller::GetCurrentPerformanceConfiguration(PerformanceMode mode) { | 74 | PerformanceConfiguration Controller::GetCurrentPerformanceConfiguration(PerformanceMode mode) { |
diff --git a/src/core/hle/service/hid/controllers/gesture.cpp b/src/core/hle/service/hid/controllers/gesture.cpp index 47d4c08fc..63eecd42b 100644 --- a/src/core/hle/service/hid/controllers/gesture.cpp +++ b/src/core/hle/service/hid/controllers/gesture.cpp | |||
| @@ -331,7 +331,7 @@ Controller_Gesture::GestureProperties Controller_Gesture::GetGestureProperties() | |||
| 331 | }; | 331 | }; |
| 332 | 332 | ||
| 333 | // Hack: There is no touch in docked but games still allow it | 333 | // Hack: There is no touch in docked but games still allow it |
| 334 | if (Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked) { | 334 | if (Settings::IsDockedMode()) { |
| 335 | gesture.points[id] = { | 335 | gesture.points[id] = { |
| 336 | .x = static_cast<s32>(active_x * Layout::ScreenDocked::Width), | 336 | .x = static_cast<s32>(active_x * Layout::ScreenDocked::Width), |
| 337 | .y = static_cast<s32>(active_y * Layout::ScreenDocked::Height), | 337 | .y = static_cast<s32>(active_y * Layout::ScreenDocked::Height), |
diff --git a/src/core/hle/service/hid/controllers/npad.cpp b/src/core/hle/service/hid/controllers/npad.cpp index ba752d472..3b349b4c4 100644 --- a/src/core/hle/service/hid/controllers/npad.cpp +++ b/src/core/hle/service/hid/controllers/npad.cpp | |||
| @@ -1518,7 +1518,7 @@ bool Controller_NPad::IsControllerSupported(Core::HID::NpadStyleIndex controller | |||
| 1518 | return false; | 1518 | return false; |
| 1519 | } | 1519 | } |
| 1520 | // Handheld shouldn't be supported in docked mode | 1520 | // Handheld shouldn't be supported in docked mode |
| 1521 | if (Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked) { | 1521 | if (Settings::IsDockedMode()) { |
| 1522 | return false; | 1522 | return false; |
| 1523 | } | 1523 | } |
| 1524 | 1524 | ||
diff --git a/src/core/hle/service/vi/vi.cpp b/src/core/hle/service/vi/vi.cpp index 6b5f3a17a..2eb978379 100644 --- a/src/core/hle/service/vi/vi.cpp +++ b/src/core/hle/service/vi/vi.cpp | |||
| @@ -217,7 +217,7 @@ private: | |||
| 217 | IPC::ResponseBuilder rb{ctx, 6}; | 217 | IPC::ResponseBuilder rb{ctx, 6}; |
| 218 | rb.Push(ResultSuccess); | 218 | rb.Push(ResultSuccess); |
| 219 | 219 | ||
| 220 | if (Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked) { | 220 | if (Settings::IsDockedMode()) { |
| 221 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); | 221 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedWidth)); |
| 222 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); | 222 | rb.Push(static_cast<u32>(Service::VI::DisplayResolution::DockedHeight)); |
| 223 | } else { | 223 | } else { |
diff --git a/src/core/telemetry_session.cpp b/src/core/telemetry_session.cpp index 8a1cd24b0..c26179e03 100644 --- a/src/core/telemetry_session.cpp +++ b/src/core/telemetry_session.cpp | |||
| @@ -276,8 +276,7 @@ void TelemetrySession::AddInitialInfo(Loader::AppLoader& app_loader, | |||
| 276 | static_cast<u32>(Settings::values.shader_backend.GetValue())); | 276 | static_cast<u32>(Settings::values.shader_backend.GetValue())); |
| 277 | AddField(field_type, "Renderer_UseAsynchronousShaders", | 277 | AddField(field_type, "Renderer_UseAsynchronousShaders", |
| 278 | Settings::values.use_asynchronous_shaders.GetValue()); | 278 | Settings::values.use_asynchronous_shaders.GetValue()); |
| 279 | AddField(field_type, "System_UseDockedMode", | 279 | AddField(field_type, "System_UseDockedMode", Settings::IsDockedMode()); |
| 280 | Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked); | ||
| 281 | } | 280 | } |
| 282 | 281 | ||
| 283 | bool TelemetrySession::SubmitTestcase() { | 282 | bool TelemetrySession::SubmitTestcase() { |
diff --git a/src/yuzu/applets/qt_controller.cpp b/src/yuzu/applets/qt_controller.cpp index c783325fb..d15559518 100644 --- a/src/yuzu/applets/qt_controller.cpp +++ b/src/yuzu/applets/qt_controller.cpp | |||
| @@ -5,6 +5,7 @@ | |||
| 5 | #include <thread> | 5 | #include <thread> |
| 6 | 6 | ||
| 7 | #include "common/assert.h" | 7 | #include "common/assert.h" |
| 8 | #include "common/settings.h" | ||
| 8 | #include "common/settings_enums.h" | 9 | #include "common/settings_enums.h" |
| 9 | #include "common/string_util.h" | 10 | #include "common/string_util.h" |
| 10 | #include "core/core.h" | 11 | #include "core/core.h" |
| @@ -227,14 +228,11 @@ int QtControllerSelectorDialog::exec() { | |||
| 227 | } | 228 | } |
| 228 | 229 | ||
| 229 | void QtControllerSelectorDialog::ApplyConfiguration() { | 230 | void QtControllerSelectorDialog::ApplyConfiguration() { |
| 230 | const bool pre_docked_mode = | 231 | const bool pre_docked_mode = Settings::IsDockedMode(); |
| 231 | Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked; | 232 | const bool docked_mode_selected = ui->radioDocked->isChecked(); |
| 232 | Settings::values.use_docked_mode.SetValue(ui->radioDocked->isChecked() | 233 | Settings::values.use_docked_mode.SetValue( |
| 233 | ? Settings::ConsoleMode::Docked | 234 | docked_mode_selected ? Settings::ConsoleMode::Docked : Settings::ConsoleMode::Handheld); |
| 234 | : Settings::ConsoleMode::Handheld); | 235 | OnDockedModeChanged(pre_docked_mode, docked_mode_selected, system); |
| 235 | OnDockedModeChanged( | ||
| 236 | pre_docked_mode, | ||
| 237 | Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked, system); | ||
| 238 | 236 | ||
| 239 | Settings::values.vibration_enabled.SetValue(ui->vibrationGroup->isChecked()); | 237 | Settings::values.vibration_enabled.SetValue(ui->vibrationGroup->isChecked()); |
| 240 | Settings::values.motion_enabled.SetValue(ui->motionGroup->isChecked()); | 238 | Settings::values.motion_enabled.SetValue(ui->motionGroup->isChecked()); |
| @@ -622,10 +620,8 @@ void QtControllerSelectorDialog::UpdateDockedState(bool is_handheld) { | |||
| 622 | ui->radioDocked->setEnabled(!is_handheld); | 620 | ui->radioDocked->setEnabled(!is_handheld); |
| 623 | ui->radioUndocked->setEnabled(!is_handheld); | 621 | ui->radioUndocked->setEnabled(!is_handheld); |
| 624 | 622 | ||
| 625 | ui->radioDocked->setChecked(Settings::values.use_docked_mode.GetValue() == | 623 | ui->radioDocked->setChecked(Settings::IsDockedMode()); |
| 626 | Settings::ConsoleMode::Docked); | 624 | ui->radioUndocked->setChecked(!Settings::IsDockedMode()); |
| 627 | ui->radioUndocked->setChecked(Settings::values.use_docked_mode.GetValue() == | ||
| 628 | Settings::ConsoleMode::Handheld); | ||
| 629 | 625 | ||
| 630 | // Also force into undocked mode if the controller type is handheld. | 626 | // Also force into undocked mode if the controller type is handheld. |
| 631 | if (is_handheld) { | 627 | if (is_handheld) { |
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 37753b47e..2afa72140 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp | |||
| @@ -928,9 +928,8 @@ void GRenderWindow::CaptureScreenshot(const QString& screenshot_path) { | |||
| 928 | const Layout::FramebufferLayout layout{[]() { | 928 | const Layout::FramebufferLayout layout{[]() { |
| 929 | u32 height = UISettings::values.screenshot_height.GetValue(); | 929 | u32 height = UISettings::values.screenshot_height.GetValue(); |
| 930 | if (height == 0) { | 930 | if (height == 0) { |
| 931 | height = Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked | 931 | height = Settings::IsDockedMode() ? Layout::ScreenDocked::Height |
| 932 | ? Layout::ScreenDocked::Height | 932 | : Layout::ScreenUndocked::Height; |
| 933 | : Layout::ScreenUndocked::Height; | ||
| 934 | height *= Settings::values.resolution_info.up_factor; | 933 | height *= Settings::values.resolution_info.up_factor; |
| 935 | } | 934 | } |
| 936 | const u32 width = | 935 | const u32 width = |
diff --git a/src/yuzu/configuration/configure_input.cpp b/src/yuzu/configuration/configure_input.cpp index 78ed8c610..e8f9ebfd8 100644 --- a/src/yuzu/configuration/configure_input.cpp +++ b/src/yuzu/configuration/configure_input.cpp | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | #include <memory> | 4 | #include <memory> |
| 5 | #include <thread> | 5 | #include <thread> |
| 6 | 6 | ||
| 7 | #include "common/settings.h" | ||
| 7 | #include "common/settings_enums.h" | 8 | #include "common/settings_enums.h" |
| 8 | #include "core/core.h" | 9 | #include "core/core.h" |
| 9 | #include "core/hid/emulated_controller.h" | 10 | #include "core/hid/emulated_controller.h" |
| @@ -198,14 +199,11 @@ void ConfigureInput::ApplyConfiguration() { | |||
| 198 | 199 | ||
| 199 | advanced->ApplyConfiguration(); | 200 | advanced->ApplyConfiguration(); |
| 200 | 201 | ||
| 201 | const bool pre_docked_mode = | 202 | const bool pre_docked_mode = Settings::IsDockedMode(); |
| 202 | Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked; | 203 | const bool docked_mode_selected = ui->radioDocked->isChecked(); |
| 203 | Settings::values.use_docked_mode.SetValue(ui->radioDocked->isChecked() | 204 | Settings::values.use_docked_mode.SetValue( |
| 204 | ? Settings::ConsoleMode::Docked | 205 | docked_mode_selected ? Settings::ConsoleMode::Docked : Settings::ConsoleMode::Handheld); |
| 205 | : Settings::ConsoleMode::Handheld); | 206 | OnDockedModeChanged(pre_docked_mode, docked_mode_selected, system); |
| 206 | OnDockedModeChanged( | ||
| 207 | pre_docked_mode, | ||
| 208 | Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked, system); | ||
| 209 | 207 | ||
| 210 | Settings::values.vibration_enabled.SetValue(ui->vibrationGroup->isChecked()); | 208 | Settings::values.vibration_enabled.SetValue(ui->vibrationGroup->isChecked()); |
| 211 | Settings::values.motion_enabled.SetValue(ui->motionGroup->isChecked()); | 209 | Settings::values.motion_enabled.SetValue(ui->motionGroup->isChecked()); |
| @@ -273,10 +271,8 @@ void ConfigureInput::UpdateDockedState(bool is_handheld) { | |||
| 273 | ui->radioDocked->setEnabled(!is_handheld); | 271 | ui->radioDocked->setEnabled(!is_handheld); |
| 274 | ui->radioUndocked->setEnabled(!is_handheld); | 272 | ui->radioUndocked->setEnabled(!is_handheld); |
| 275 | 273 | ||
| 276 | ui->radioDocked->setChecked(Settings::values.use_docked_mode.GetValue() == | 274 | ui->radioDocked->setChecked(Settings::IsDockedMode()); |
| 277 | Settings::ConsoleMode::Docked); | 275 | ui->radioUndocked->setChecked(!Settings::IsDockedMode()); |
| 278 | ui->radioUndocked->setChecked(Settings::values.use_docked_mode.GetValue() == | ||
| 279 | Settings::ConsoleMode::Handheld); | ||
| 280 | 276 | ||
| 281 | // Also force into undocked mode if the controller type is handheld. | 277 | // Also force into undocked mode if the controller type is handheld. |
| 282 | if (is_handheld) { | 278 | if (is_handheld) { |
diff --git a/src/yuzu/configuration/configure_per_game.cpp b/src/yuzu/configuration/configure_per_game.cpp index e371f902e..b91d6ad4a 100644 --- a/src/yuzu/configuration/configure_per_game.cpp +++ b/src/yuzu/configuration/configure_per_game.cpp | |||
| @@ -99,9 +99,8 @@ void ConfigurePerGame::ApplyConfiguration() { | |||
| 99 | addons_tab->ApplyConfiguration(); | 99 | addons_tab->ApplyConfiguration(); |
| 100 | input_tab->ApplyConfiguration(); | 100 | input_tab->ApplyConfiguration(); |
| 101 | 101 | ||
| 102 | if (Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked && | 102 | if (Settings::IsDockedMode() && Settings::values.players.GetValue()[0].controller_type == |
| 103 | Settings::values.players.GetValue()[0].controller_type == | 103 | Settings::ControllerType::Handheld) { |
| 104 | Settings::ControllerType::Handheld) { | ||
| 105 | Settings::values.use_docked_mode.SetValue(Settings::ConsoleMode::Handheld); | 104 | Settings::values.use_docked_mode.SetValue(Settings::ConsoleMode::Handheld); |
| 106 | Settings::values.use_docked_mode.SetGlobal(true); | 105 | Settings::values.use_docked_mode.SetGlobal(true); |
| 107 | } | 106 | } |
diff --git a/src/yuzu/main.cpp b/src/yuzu/main.cpp index 8ab4e73b1..8fe8d0a23 100644 --- a/src/yuzu/main.cpp +++ b/src/yuzu/main.cpp | |||
| @@ -3636,8 +3636,7 @@ void GMainWindow::OnTasReset() { | |||
| 3636 | } | 3636 | } |
| 3637 | 3637 | ||
| 3638 | void GMainWindow::OnToggleDockedMode() { | 3638 | void GMainWindow::OnToggleDockedMode() { |
| 3639 | const bool is_docked = | 3639 | const bool is_docked = Settings::IsDockedMode(); |
| 3640 | Settings::values.use_docked_mode.GetValue() == Settings::ConsoleMode::Docked; | ||
| 3641 | auto* player_1 = system->HIDCore().GetEmulatedController(Core::HID::NpadIdType::Player1); | 3640 | auto* player_1 = system->HIDCore().GetEmulatedController(Core::HID::NpadIdType::Player1); |
| 3642 | auto* handheld = system->HIDCore().GetEmulatedController(Core::HID::NpadIdType::Handheld); | 3641 | auto* handheld = system->HIDCore().GetEmulatedController(Core::HID::NpadIdType::Handheld); |
| 3643 | 3642 | ||
| @@ -4082,10 +4081,10 @@ void GMainWindow::UpdateGPUAccuracyButton() { | |||
| 4082 | } | 4081 | } |
| 4083 | 4082 | ||
| 4084 | void GMainWindow::UpdateDockedButton() { | 4083 | void GMainWindow::UpdateDockedButton() { |
| 4085 | const auto is_docked = Settings::values.use_docked_mode.GetValue(); | 4084 | const auto console_mode = Settings::values.use_docked_mode.GetValue(); |
| 4086 | dock_status_button->setChecked(is_docked == Settings::ConsoleMode::Docked); | 4085 | dock_status_button->setChecked(console_mode == Settings::ConsoleMode::Docked); |
| 4087 | dock_status_button->setText( | 4086 | dock_status_button->setText( |
| 4088 | Config::use_docked_mode_texts_map.find(is_docked)->second.toUpper()); | 4087 | Config::use_docked_mode_texts_map.find(console_mode)->second.toUpper()); |
| 4089 | } | 4088 | } |
| 4090 | 4089 | ||
| 4091 | void GMainWindow::UpdateAPIText() { | 4090 | void GMainWindow::UpdateAPIText() { |