From 5056d23d0d1cddeb73975b487ea8c1b7b61eb087 Mon Sep 17 00:00:00 2001 From: bunnei Date: Fri, 28 Feb 2020 01:10:41 -0500 Subject: renderer_opengl: Fix SRGB presentation frame tracking. - Fixes SRGB in Super Smash Bros. Ultimate. --- src/video_core/renderer_opengl/renderer_opengl.cpp | 4 ++-- src/video_core/renderer_opengl/renderer_opengl.h | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index 447f69d4d..a4340b502 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -353,9 +353,9 @@ void RendererOpenGL::SwapBuffers(const Tegra::FramebufferConfig* framebuffer) { // Recreate the frame if the size of the window has changed if (layout.width != frame->width || layout.height != frame->height || - is_srgb != frame->is_srgb) { + screen_info.display_srgb != frame->is_srgb) { LOG_DEBUG(Render_OpenGL, "Reloading render frame"); - is_srgb = frame->is_srgb = screen_info.display_srgb; + frame->is_srgb = screen_info.display_srgb; frame_mailbox->ReloadRenderFrame(frame, layout.width, layout.height); } state.draw.draw_framebuffer = frame->render.handle; diff --git a/src/video_core/renderer_opengl/renderer_opengl.h b/src/video_core/renderer_opengl/renderer_opengl.h index 4107e10a9..d45e69cbc 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.h +++ b/src/video_core/renderer_opengl/renderer_opengl.h @@ -111,9 +111,6 @@ private: Tegra::FramebufferConfig::TransformFlags framebuffer_transform_flags; Common::Rectangle framebuffer_crop_rect; - /// Represents if the final render frame is sRGB - bool is_srgb{}; - /// Frame presentation mailbox std::unique_ptr frame_mailbox; }; -- cgit v1.2.3