From 9a56b99fa46b6a8d13537f1660557e7a91545dee Mon Sep 17 00:00:00 2001 From: fearlessTobi Date: Fri, 15 Feb 2019 21:27:29 +0100 Subject: renderer_opengl: respect the sRGB colorspace for the screenshot feature Previously, we were completely ignoring for screenshots whether the game uses RGB or sRGB. This resulted in screenshot colors that looked off for some titles. --- src/video_core/renderer_opengl/renderer_opengl.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index cca2ed708..f23aad2c5 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp @@ -380,7 +380,8 @@ void RendererOpenGL::CaptureScreenshot() { GLuint renderbuffer; glGenRenderbuffers(1, &renderbuffer); glBindRenderbuffer(GL_RENDERBUFFER, renderbuffer); - glRenderbufferStorage(GL_RENDERBUFFER, GL_RGB8, layout.width, layout.height); + glRenderbufferStorage(GL_RENDERBUFFER, state.GetsRGBUsed() ? GL_SRGB8 : GL_RGB8, layout.width, + layout.height); glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_COLOR_ATTACHMENT0, GL_RENDERBUFFER, renderbuffer); DrawScreen(layout); -- cgit v1.2.3