summaryrefslogtreecommitdiff
path: root/src/core/settings.cpp
diff options
context:
space:
mode:
authorGravatar Lioncash2018-08-01 20:59:42 -0400
committerGravatar Lioncash2018-08-01 21:40:30 -0400
commit0f2ac928f291101bd74aac661cff7d14dfa8c984 (patch)
tree39d1ba26d25bd06874b58990c5deb4d1f4ed252d /src/core/settings.cpp
parentMerge pull request #885 from greggameplayer/R32-Float (diff)
downloadyuzu-0f2ac928f291101bd74aac661cff7d14dfa8c984.tar.gz
yuzu-0f2ac928f291101bd74aac661cff7d14dfa8c984.tar.xz
yuzu-0f2ac928f291101bd74aac661cff7d14dfa8c984.zip
video_core: Make global EmuWindow instance part of the base renderer class
Makes the global a member of the RendererBase class. We also change this to be a reference. Passing any form of null pointer to these functions is incorrect entirely, especially given the code itself assumes that the pointer would always be in a valid state. This also makes it easier to follow the lifecycle of instances being used, as we explicitly interact the renderer with the rasterizer, rather than it just operating on a global pointer.
Diffstat (limited to 'src/core/settings.cpp')
-rw-r--r--src/core/settings.cpp8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/core/settings.cpp b/src/core/settings.cpp
index 444bcc387..79e0b347b 100644
--- a/src/core/settings.cpp
+++ b/src/core/settings.cpp
@@ -5,10 +5,9 @@
5#include "core/gdbstub/gdbstub.h" 5#include "core/gdbstub/gdbstub.h"
6#include "core/hle/service/hid/hid.h" 6#include "core/hle/service/hid/hid.h"
7#include "core/settings.h" 7#include "core/settings.h"
8#include "video_core/renderer_base.h"
8#include "video_core/video_core.h" 9#include "video_core/video_core.h"
9 10
10#include "core/frontend/emu_window.h"
11
12namespace Settings { 11namespace Settings {
13 12
14Values values = {}; 13Values values = {};
@@ -20,9 +19,8 @@ void Apply() {
20 19
21 VideoCore::g_toggle_framelimit_enabled = values.toggle_framelimit; 20 VideoCore::g_toggle_framelimit_enabled = values.toggle_framelimit;
22 21
23 if (VideoCore::g_emu_window) { 22 if (VideoCore::g_renderer) {
24 auto layout = VideoCore::g_emu_window->GetFramebufferLayout(); 23 VideoCore::g_renderer->UpdateCurrentFramebufferLayout();
25 VideoCore::g_emu_window->UpdateCurrentFramebufferLayout(layout.width, layout.height);
26 } 24 }
27 25
28 Service::HID::ReloadInputDevices(); 26 Service::HID::ReloadInputDevices();