diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-01-27 11:34:59 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2023-01-31 18:46:02 +1300 |
| commit | 8a236293455e9a71aa6fb400a6253c27540e403b (patch) | |
| tree | 6c7d9d1b2b289012c1cc8912d950b252e4b035e2 /Source/Core/DolphinQt/Host.cpp | |
| parent | e57eb04ed3b40e806fa081fc1bdaeaa0c03e4e66 (diff) | |
Split AbstractGfx out of Renderer
Almost all the virtual functions in Renderer are part of dolphin's
"graphics api abstraction layer", which has slowly formed over the
last decade or two.
Most of the work was done previously with the introduction of the
various "AbstractX" classes, associated with texture cache cleanups
and implementation of newer graphics APIs (Direct3D 12, Vulkan, Metal).
We are simply taking the last step and yeeting these functions out
of Renderer.
This "AbstractGfx" class is now completely agnostic of any details
from the flipper/hollywood GPU we are emulating, though somewhat
specialized.
(Will not build, this commit only contains changes outside VideoBackends)
Diffstat (limited to 'Source/Core/DolphinQt/Host.cpp')
| -rw-r--r-- | Source/Core/DolphinQt/Host.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/Source/Core/DolphinQt/Host.cpp b/Source/Core/DolphinQt/Host.cpp index 5eb2055486..036dc2cffa 100644 --- a/Source/Core/DolphinQt/Host.cpp +++ b/Source/Core/DolphinQt/Host.cpp @@ -36,9 +36,9 @@ #include "UICommon/DiscordPresence.h" +#include "VideoCommon/AbstractGfx.h" #include "VideoCommon/Fifo.cpp" #include "VideoCommon/Present.h" -#include "VideoCommon/RenderBase.h" #include "VideoCommon/VideoConfig.h" static thread_local bool tls_is_host_thread = false; @@ -150,11 +150,11 @@ bool Host::GetRenderFullFocus() void Host::SetRenderFocus(bool focus) { m_render_focus = focus; - if (g_renderer && m_render_fullscreen && g_ActiveConfig.ExclusiveFullscreenEnabled()) + if (g_gfx && m_render_fullscreen && g_ActiveConfig.ExclusiveFullscreenEnabled()) { RunWithGPUThreadInactive([focus] { if (!Config::Get(Config::MAIN_RENDER_TO_MAIN)) - g_renderer->SetFullscreen(focus); + g_gfx->SetFullscreen(focus); }); } } @@ -182,10 +182,9 @@ void Host::SetRenderFullscreen(bool fullscreen) { m_render_fullscreen = fullscreen; - if (g_renderer && g_renderer->IsFullscreen() != fullscreen && - g_ActiveConfig.ExclusiveFullscreenEnabled()) + if (g_gfx && g_gfx->IsFullscreen() != fullscreen && g_ActiveConfig.ExclusiveFullscreenEnabled()) { - RunWithGPUThreadInactive([fullscreen] { g_renderer->SetFullscreen(fullscreen); }); + RunWithGPUThreadInactive([fullscreen] { g_gfx->SetFullscreen(fullscreen); }); } } |
