mirror of
https://github.com/libretro/scummvm.git
synced 2025-02-04 01:46:42 +00:00
GRIM/EMI: Fix off-by-one in GfxOpenGL::readPixels
This commit is contained in:
parent
a39576d921
commit
97d5bd9247
@ -1977,7 +1977,7 @@ void GfxOpenGL::drawPolygon(const PrimitiveObject *primitive) {
|
||||
void GfxOpenGL::readPixels(int x, int y, int width, int height, uint8 *buffer) {
|
||||
uint8 *p = buffer;
|
||||
for (int i = y; i < y + height; i++) {
|
||||
glReadPixels(x, _screenHeight - i, width, 1, GL_RGBA, GL_UNSIGNED_BYTE, p);
|
||||
glReadPixels(x, _screenHeight - 1 - i, width, 1, GL_RGBA, GL_UNSIGNED_BYTE, p);
|
||||
p += width * 4;
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user