diff options
author | bunnei <bunneidev@gmail.com> | 2018-09-12 05:13:11 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-12 05:13:11 +0200 |
commit | 89825766ee5a1d7eec5f4bda24f47c93d7ae1da9 (patch) | |
tree | f9806234a3bca6496826eb45485fb0c9c677a1e6 /src/video_core | |
parent | Merge pull request #1295 from bunnei/accurate-copies (diff) | |
parent | Port Citra #4047 & #4052: add change background color support (diff) | |
download | yuzu-89825766ee5a1d7eec5f4bda24f47c93d7ae1da9.tar yuzu-89825766ee5a1d7eec5f4bda24f47c93d7ae1da9.tar.gz yuzu-89825766ee5a1d7eec5f4bda24f47c93d7ae1da9.tar.bz2 yuzu-89825766ee5a1d7eec5f4bda24f47c93d7ae1da9.tar.lz yuzu-89825766ee5a1d7eec5f4bda24f47c93d7ae1da9.tar.xz yuzu-89825766ee5a1d7eec5f4bda24f47c93d7ae1da9.tar.zst yuzu-89825766ee5a1d7eec5f4bda24f47c93d7ae1da9.zip |
Diffstat (limited to 'src/video_core')
-rw-r--r-- | src/video_core/renderer_base.cpp | 1 | ||||
-rw-r--r-- | src/video_core/renderer_base.h | 1 | ||||
-rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 6 |
3 files changed, 8 insertions, 0 deletions
diff --git a/src/video_core/renderer_base.cpp b/src/video_core/renderer_base.cpp index be17a2b9c..0df3725c2 100644 --- a/src/video_core/renderer_base.cpp +++ b/src/video_core/renderer_base.cpp @@ -19,6 +19,7 @@ void RendererBase::RefreshBaseSettings() { UpdateCurrentFramebufferLayout(); renderer_settings.use_framelimiter = Settings::values.use_frame_limit; + 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 2a357f9d0..2cd0738ff 100644 --- a/src/video_core/renderer_base.h +++ b/src/video_core/renderer_base.h @@ -19,6 +19,7 @@ namespace VideoCore { struct RendererSettings { std::atomic_bool use_framelimiter{false}; + std::atomic_bool set_background_color{false}; }; class RendererBase : NonCopyable { diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index ccff3e342..96d916b07 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -369,6 +369,12 @@ void RendererOpenGL::DrawScreenTriangles(const ScreenInfo& screen_info, float x, * Draws the emulated screens to the emulator window. */ void RendererOpenGL::DrawScreen() { + if (renderer_settings.set_background_color) { + // Update background color before drawing + glClearColor(Settings::values.bg_red, Settings::values.bg_green, Settings::values.bg_blue, + 0.0f); + } + const auto& layout = render_window.GetFramebufferLayout(); const auto& screen = layout.screen; |