Fix a potential bug in captureScreenshot on some older systems

This commit is contained in:
Alex Szpakowski
2020-10-25 23:00:12 -03:00
parent 7934ce0a66
commit 442f37e0a1
+1 -1
View File
@@ -1096,7 +1096,7 @@ void Graphics::present(void *screenshotCallbackData)
throw love::Exception("Out of memory.");
}
gl.bindFramebuffer(OpenGL::FRAMEBUFFER_READ, getSystemBackbufferFBO());
gl.bindFramebuffer(OpenGL::FRAMEBUFFER_ALL, getSystemBackbufferFBO());
glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
// Replace alpha values with full opacity.