From c80ae87b4ec29903f8c65641bd7e3c6460484801 Mon Sep 17 00:00:00 2001 From: ameerj <52414509+ameerj@users.noreply.github.com> Date: Thu, 22 Jul 2021 20:08:01 -0400 Subject: [PATCH] renderer_base: Removed redundant settings use_framelimiter was not being used internally by the renderers. set_background_color was always set to true as there is no toggle for the renderer background color, instead users directly choose the color of their choice. --- src/video_core/renderer_base.cpp | 3 --- src/video_core/renderer_base.h | 3 --- src/video_core/renderer_opengl/renderer_opengl.cpp | 10 ++++------ 3 files changed, 4 insertions(+), 12 deletions(-) diff --git a/src/video_core/renderer_base.cpp b/src/video_core/renderer_base.cpp index 6fe68141f..3ea72fda9 100644 --- a/src/video_core/renderer_base.cpp +++ b/src/video_core/renderer_base.cpp @@ -19,9 +19,6 @@ RendererBase::~RendererBase() = default; void RendererBase::RefreshBaseSettings() { UpdateCurrentFramebufferLayout(); - - renderer_settings.use_framelimiter = Settings::values.use_speed_limit.GetValue(); - renderer_settings.set_background_color = true; } void RendererBase::UpdateCurrentFramebufferLayout() { diff --git a/src/video_core/renderer_base.h b/src/video_core/renderer_base.h index 63d8ad42a..22b80c328 100644 --- a/src/video_core/renderer_base.h +++ b/src/video_core/renderer_base.h @@ -21,9 +21,6 @@ class GraphicsContext; namespace VideoCore { struct RendererSettings { - std::atomic_bool use_framelimiter{false}; - std::atomic_bool set_background_color{false}; - // Screenshot std::atomic screenshot_requested{false}; void* screenshot_bits{}; diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index c12929de6..fa1d04908 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -332,12 +332,10 @@ void RendererOpenGL::ConfigureFramebufferTexture(TextureInfo& texture, } void RendererOpenGL::DrawScreen(const Layout::FramebufferLayout& layout) { - if (renderer_settings.set_background_color) { - // Update background color before drawing - glClearColor(Settings::values.bg_red.GetValue() / 255.0f, - Settings::values.bg_green.GetValue() / 255.0f, - Settings::values.bg_blue.GetValue() / 255.0f, 1.0f); - } + // Update background color before drawing + glClearColor(Settings::values.bg_red.GetValue() / 255.0f, + Settings::values.bg_green.GetValue() / 255.0f, + Settings::values.bg_blue.GetValue() / 255.0f, 1.0f); // Set projection matrix const std::array ortho_matrix =