summaryrefslogtreecommitdiff
path: root/src/core/settings.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-10 18:39:37 -0400
committerGravatar Lioncash2018-08-10 19:00:09 -0400
commit20c2928c2b157b8a322a128732cd00cabbfa9d6d (patch)
treef7db86f1b27135d7cc352c6eb5de4f2949d7e0f4 /src/core/settings.cpp
parentrenderer_base: Remove unused kFramebuffer enumeration (diff)
downloadyuzu-20c2928c2b157b8a322a128732cd00cabbfa9d6d.tar.gz
yuzu-20c2928c2b157b8a322a128732cd00cabbfa9d6d.tar.xz
yuzu-20c2928c2b157b8a322a128732cd00cabbfa9d6d.zip
video_core; Get rid of global g_toggle_framelimit_enabled variable
Instead, we make a struct for renderer settings and allow the renderer to update all of these settings, getting rid of the need for global-scoped variables. This also uncovered a few indirect inclusions for certain headers, which this commit also fixes.
Diffstat (limited to 'src/core/settings.cpp')
-rw-r--r--src/core/settings.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/src/core/settings.cpp b/src/core/settings.cpp
index a4623223d..0da159559 100644
--- a/src/core/settings.cpp
+++ b/src/core/settings.cpp
@@ -7,22 +7,18 @@
7#include "core/hle/service/hid/hid.h" 7#include "core/hle/service/hid/hid.h"
8#include "core/settings.h" 8#include "core/settings.h"
9#include "video_core/renderer_base.h" 9#include "video_core/renderer_base.h"
10#include "video_core/video_core.h"
11 10
12namespace Settings { 11namespace Settings {
13 12
14Values values = {}; 13Values values = {};
15 14
16void Apply() { 15void Apply() {
17
18 GDBStub::SetServerPort(values.gdbstub_port); 16 GDBStub::SetServerPort(values.gdbstub_port);
19 GDBStub::ToggleServer(values.use_gdbstub); 17 GDBStub::ToggleServer(values.use_gdbstub);
20 18
21 VideoCore::g_toggle_framelimit_enabled = values.toggle_framelimit;
22
23 auto& system_instance = Core::System::GetInstance(); 19 auto& system_instance = Core::System::GetInstance();
24 if (system_instance.IsPoweredOn()) { 20 if (system_instance.IsPoweredOn()) {
25 system_instance.Renderer().UpdateCurrentFramebufferLayout(); 21 system_instance.Renderer().RefreshBaseSettings();
26 } 22 }
27 23
28 Service::HID::ReloadInputDevices(); 24 Service::HID::ReloadInputDevices();