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.
This commit is contained in:
parent
b49d042200
commit
f61c9c3eb7
14 changed files with 49 additions and 54 deletions
|
@ -4,11 +4,11 @@
|
|||
|
||||
#include "audio_core/dsp_interface.h"
|
||||
#include "core/core.h"
|
||||
#include "core/frontend/emu_window.h"
|
||||
#include "core/gdbstub/gdbstub.h"
|
||||
#include "core/hle/service/hid/hid.h"
|
||||
#include "core/hle/service/ir/ir.h"
|
||||
#include "core/settings.h"
|
||||
#include "video_core/renderer_base.h"
|
||||
#include "video_core/video_core.h"
|
||||
|
||||
namespace Settings {
|
||||
|
@ -26,9 +26,8 @@ void Apply() {
|
|||
VideoCore::g_hw_shader_accurate_gs = values.shaders_accurate_gs;
|
||||
VideoCore::g_hw_shader_accurate_mul = values.shaders_accurate_mul;
|
||||
|
||||
if (VideoCore::g_emu_window) {
|
||||
auto layout = VideoCore::g_emu_window->GetFramebufferLayout();
|
||||
VideoCore::g_emu_window->UpdateCurrentFramebufferLayout(layout.width, layout.height);
|
||||
if (VideoCore::g_renderer) {
|
||||
VideoCore::g_renderer->UpdateCurrentFramebufferLayout();
|
||||
}
|
||||
|
||||
VideoCore::g_renderer_bg_color_update_requested = true;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue