diff options
| author | Scott Mansell <phiren@gmail.com> | 2023-01-30 05:01:05 +1300 |
|---|---|---|
| committer | Scott Mansell <phiren@gmail.com> | 2023-01-31 19:41:24 +1300 |
| commit | ca5ec13e138d60d2fbac114450527c654caed702 (patch) | |
| tree | 6451afd8815b451f31aa058ab3a5c1cd4078c19b /Source/Core/VideoCommon/RenderBase.cpp | |
| parent | 55d15bdd6ea04c0f0862a1a23dc4859b3e30ad64 (diff) | |
Move GraphicsMod out of RenderBase
Diffstat (limited to 'Source/Core/VideoCommon/RenderBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/RenderBase.cpp | 32 |
1 files changed, 3 insertions, 29 deletions
diff --git a/Source/Core/VideoCommon/RenderBase.cpp b/Source/Core/VideoCommon/RenderBase.cpp index 89e84d2d6e..942006a07f 100644 --- a/Source/Core/VideoCommon/RenderBase.cpp +++ b/Source/Core/VideoCommon/RenderBase.cpp @@ -45,7 +45,7 @@ #include "VideoCommon/FrameDumper.h" #include "VideoCommon/FramebufferManager.h" #include "VideoCommon/FreeLookCamera.h" -#include "VideoCommon/GraphicsModSystem/Config/GraphicsModGroup.h" +#include "VideoCommon/GraphicsModSystem/Runtime/GraphicsModManager.h" #include "VideoCommon/OnScreenDisplay.h" #include "VideoCommon/PerformanceMetrics.h" #include "VideoCommon/PixelEngine.h" @@ -74,27 +74,6 @@ Renderer::Renderer() Renderer::~Renderer() = default; -bool Renderer::Initialize() -{ - if (g_ActiveConfig.bGraphicMods) - { - // If a config change occurred in a previous session, - // remember the old change count value. By setting - // our current change count to the old value, we - // avoid loading the stale data when we - // check for config changes. - const u32 old_game_mod_changes = g_ActiveConfig.graphics_mod_config ? - g_ActiveConfig.graphics_mod_config->GetChangeCount() : - 0; - g_ActiveConfig.graphics_mod_config = GraphicsModGroupConfig(SConfig::GetInstance().GetGameID()); - g_ActiveConfig.graphics_mod_config->Load(); - g_ActiveConfig.graphics_mod_config->SetChangeCount(old_game_mod_changes); - m_graphics_mod_manager.Load(*g_ActiveConfig.graphics_mod_config); - } - - return true; -} - bool Renderer::EFBHasAlphaChannel() const { return m_prev_efb_format == PixelFormat::RGBA6_Z24; @@ -338,7 +317,7 @@ void Renderer::CheckForConfigChanges() if (g_ActiveConfig.graphics_mod_config && (old_game_mod_changes != g_ActiveConfig.graphics_mod_config->GetChangeCount())) { - m_graphics_mod_manager.Load(*g_ActiveConfig.graphics_mod_config); + g_graphics_mod_manager->Load(*g_ActiveConfig.graphics_mod_config); } // Update texture cache settings with any changed options. @@ -541,7 +520,7 @@ void Renderer::Swap(u32 xfb_addr, u32 fb_width, u32 fb_stride, u32 fb_height, u6 if (g_ActiveConfig.bGraphicMods) { - m_graphics_mod_manager.EndOfFrame(); + g_graphics_mod_manager->EndOfFrame(); } g_framebuffer_manager->EndOfFrame(); @@ -675,8 +654,3 @@ void Renderer::DoState(PointerWrap& p) g_frame_dumper->DoState(p); #endif } - -const GraphicsModManager& Renderer::GetGraphicsModManager() const -{ - return m_graphics_mod_manager; -} |
