summaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
authorGravatar bunnei2018-08-03 00:31:32 -0400
committerGravatar GitHub2018-08-03 00:31:32 -0400
commit00ba704a7fe55460e606075ce280e8933a80e973 (patch)
tree773d3cd59cffd5682f9625e354f68f734be77351 /src/core
parentMerge pull request #894 from lioncash/object (diff)
parentvideo_core: Make global EmuWindow instance part of the base renderer class (diff)
downloadyuzu-00ba704a7fe55460e606075ce280e8933a80e973.tar.gz
yuzu-00ba704a7fe55460e606075ce280e8933a80e973.tar.xz
yuzu-00ba704a7fe55460e606075ce280e8933a80e973.zip
Merge pull request #892 from lioncash/global
video_core: Make global EmuWindow instance part of the base renderer …
Diffstat (limited to 'src/core')
-rw-r--r--src/core/core.cpp4
-rw-r--r--src/core/core.h10
-rw-r--r--src/core/settings.cpp8
3 files changed, 11 insertions, 11 deletions
diff --git a/src/core/core.cpp b/src/core/core.cpp
index 32551094d..54fc4170f 100644
--- a/src/core/core.cpp
+++ b/src/core/core.cpp
@@ -84,7 +84,7 @@ System::ResultStatus System::SingleStep() {
84 return RunLoop(false); 84 return RunLoop(false);
85} 85}
86 86
87System::ResultStatus System::Load(EmuWindow* emu_window, const std::string& filepath) { 87System::ResultStatus System::Load(EmuWindow& emu_window, const std::string& filepath) {
88 app_loader = Loader::GetLoader(std::make_shared<FileSys::RealVfsFile>(filepath)); 88 app_loader = Loader::GetLoader(std::make_shared<FileSys::RealVfsFile>(filepath));
89 89
90 if (!app_loader) { 90 if (!app_loader) {
@@ -161,7 +161,7 @@ Cpu& System::CpuCore(size_t core_index) {
161 return *cpu_cores[core_index]; 161 return *cpu_cores[core_index];
162} 162}
163 163
164System::ResultStatus System::Init(EmuWindow* emu_window, u32 system_mode) { 164System::ResultStatus System::Init(EmuWindow& emu_window, u32 system_mode) {
165 LOG_DEBUG(HW_Memory, "initialized OK"); 165 LOG_DEBUG(HW_Memory, "initialized OK");
166 166
167 CoreTiming::Init(); 167 CoreTiming::Init();
diff --git a/src/core/core.h b/src/core/core.h
index 3355604e4..f8b6644bb 100644
--- a/src/core/core.h
+++ b/src/core/core.h
@@ -81,11 +81,12 @@ public:
81 81
82 /** 82 /**
83 * Load an executable application. 83 * Load an executable application.
84 * @param emu_window Pointer to the host-system window used for video output and keyboard input. 84 * @param emu_window Reference to the host-system window used for video output and keyboard
85 * input.
85 * @param filepath String path to the executable application to load on the host file system. 86 * @param filepath String path to the executable application to load on the host file system.
86 * @returns ResultStatus code, indicating if the operation succeeded. 87 * @returns ResultStatus code, indicating if the operation succeeded.
87 */ 88 */
88 ResultStatus Load(EmuWindow* emu_window, const std::string& filepath); 89 ResultStatus Load(EmuWindow& emu_window, const std::string& filepath);
89 90
90 /** 91 /**
91 * Indicates if the emulated system is powered on (all subsystems initialized and able to run an 92 * Indicates if the emulated system is powered on (all subsystems initialized and able to run an
@@ -186,11 +187,12 @@ private:
186 187
187 /** 188 /**
188 * Initialize the emulated system. 189 * Initialize the emulated system.
189 * @param emu_window Pointer to the host-system window used for video output and keyboard input. 190 * @param emu_window Reference to the host-system window used for video output and keyboard
191 * input.
190 * @param system_mode The system mode. 192 * @param system_mode The system mode.
191 * @return ResultStatus code, indicating if the operation succeeded. 193 * @return ResultStatus code, indicating if the operation succeeded.
192 */ 194 */
193 ResultStatus Init(EmuWindow* emu_window, u32 system_mode); 195 ResultStatus Init(EmuWindow& emu_window, u32 system_mode);
194 196
195 /// AppLoader used to load the current executing application 197 /// AppLoader used to load the current executing application
196 std::unique_ptr<Loader::AppLoader> app_loader; 198 std::unique_ptr<Loader::AppLoader> app_loader;
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();