summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2019-02-16 21:36:00 +0100
committerGitHub <noreply@github.com>2019-02-16 21:36:00 +0100
commit4699fdca8f2d85cfd5f7923949db3432ce30a104 (patch)
tree1e2d61c6a3072c1a1d365c9cadb39c62a46f9fd4
parentMerge pull request #2128 from FearlessTobi/port-4197 (diff)
parentrenderer_opengl: respect the sRGB colorspace for the screenshot feature (diff)
downloadyuzu-4699fdca8f2d85cfd5f7923949db3432ce30a104.tar
yuzu-4699fdca8f2d85cfd5f7923949db3432ce30a104.tar.gz
yuzu-4699fdca8f2d85cfd5f7923949db3432ce30a104.tar.bz2
yuzu-4699fdca8f2d85cfd5f7923949db3432ce30a104.tar.lz
yuzu-4699fdca8f2d85cfd5f7923949db3432ce30a104.tar.xz
yuzu-4699fdca8f2d85cfd5f7923949db3432ce30a104.tar.zst
yuzu-4699fdca8f2d85cfd5f7923949db3432ce30a104.zip
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index d40666ac6..272fc2e8e 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);