summaryrefslogtreecommitdiffstats
path: root/src/core/settings.cpp
diff options
context:
space:
mode:
authorRodrigo Locatti <reinuseslisp@airmail.cc>2020-11-27 23:29:59 +0100
committerGitHub <noreply@github.com>2020-11-27 23:29:59 +0100
commit1dbe39f7a25357b40541ca536698cb09bb7df4ff (patch)
tree285ffb3801aa773cb3537f77153a9e432390f6b8 /src/core/settings.cpp
parentMerge pull request #5023 from lioncash/save-global (diff)
parentcore: Eliminate remaining usages of the global system instance (diff)
downloadyuzu-1dbe39f7a25357b40541ca536698cb09bb7df4ff.tar
yuzu-1dbe39f7a25357b40541ca536698cb09bb7df4ff.tar.gz
yuzu-1dbe39f7a25357b40541ca536698cb09bb7df4ff.tar.bz2
yuzu-1dbe39f7a25357b40541ca536698cb09bb7df4ff.tar.lz
yuzu-1dbe39f7a25357b40541ca536698cb09bb7df4ff.tar.xz
yuzu-1dbe39f7a25357b40541ca536698cb09bb7df4ff.tar.zst
yuzu-1dbe39f7a25357b40541ca536698cb09bb7df4ff.zip
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 @@
#include <string_view>
+#include "common/assert.h"
#include "common/file_util.h"
+#include "common/logging/log.h"
#include "core/core.h"
-#include "core/gdbstub/gdbstub.h"
#include "core/hle/service/hid/hid.h"
#include "core/settings.h"
#include "video_core/renderer_base.h"
@@ -31,13 +32,9 @@ std::string GetTimeZoneString() {
return timezones[time_zone_index];
}
-void Apply() {
- GDBStub::SetServerPort(values.gdbstub_port);
- GDBStub::ToggleServer(values.use_gdbstub);
-
- auto& system_instance = Core::System::GetInstance();
- if (system_instance.IsPoweredOn()) {
- system_instance.Renderer().RefreshBaseSettings();
+void Apply(Core::System& system) {
+ if (system.IsPoweredOn()) {
+ system.Renderer().RefreshBaseSettings();
}
Service::HID::ReloadInputDevices();
@@ -106,9 +103,9 @@ float Volume() {
return values.volume.GetValue();
}
-void RestoreGlobalState() {
+void RestoreGlobalState(bool is_powered_on) {
// If a game is running, DO NOT restore the global settings state
- if (Core::System::GetInstance().IsPoweredOn()) {
+ if (is_powered_on) {
return;
}