summaryrefslogtreecommitdiff
path: root/src/core/settings.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/settings.cpp')
-rw-r--r--src/core/settings.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/core/settings.cpp b/src/core/settings.cpp
index aadbc3932..e9997a263 100644
--- a/src/core/settings.cpp
+++ b/src/core/settings.cpp
@@ -4,9 +4,10 @@
4 4
5#include <string_view> 5#include <string_view>
6 6
7#include "common/assert.h"
7#include "common/file_util.h" 8#include "common/file_util.h"
9#include "common/logging/log.h"
8#include "core/core.h" 10#include "core/core.h"
9#include "core/gdbstub/gdbstub.h"
10#include "core/hle/service/hid/hid.h" 11#include "core/hle/service/hid/hid.h"
11#include "core/settings.h" 12#include "core/settings.h"
12#include "video_core/renderer_base.h" 13#include "video_core/renderer_base.h"
@@ -31,13 +32,9 @@ std::string GetTimeZoneString() {
31 return timezones[time_zone_index]; 32 return timezones[time_zone_index];
32} 33}
33 34
34void Apply() { 35void Apply(Core::System& system) {
35 GDBStub::SetServerPort(values.gdbstub_port); 36 if (system.IsPoweredOn()) {
36 GDBStub::ToggleServer(values.use_gdbstub); 37 system.Renderer().RefreshBaseSettings();
37
38 auto& system_instance = Core::System::GetInstance();
39 if (system_instance.IsPoweredOn()) {
40 system_instance.Renderer().RefreshBaseSettings();
41 } 38 }
42 39
43 Service::HID::ReloadInputDevices(); 40 Service::HID::ReloadInputDevices();
@@ -106,9 +103,9 @@ float Volume() {
106 return values.volume.GetValue(); 103 return values.volume.GetValue();
107} 104}
108 105
109void RestoreGlobalState() { 106void RestoreGlobalState(bool is_powered_on) {
110 // If a game is running, DO NOT restore the global settings state 107 // If a game is running, DO NOT restore the global settings state
111 if (Core::System::GetInstance().IsPoweredOn()) { 108 if (is_powered_on) {
112 return; 109 return;
113 } 110 }
114 111