mirror of
https://github.com/love2d/love.git
synced 2026-08-20 12:40:20 +02:00
Fix a potential bug in captureScreenshot on some older systems
This commit is contained in:
@@ -1096,7 +1096,7 @@ void Graphics::present(void *screenshotCallbackData)
|
|||||||
throw love::Exception("Out of memory.");
|
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);
|
glReadPixels(0, 0, w, h, GL_RGBA, GL_UNSIGNED_BYTE, pixels);
|
||||||
|
|
||||||
// Replace alpha values with full opacity.
|
// Replace alpha values with full opacity.
|
||||||
|
|||||||
Reference in New Issue
Block a user