GRIM: Fix build
This commit is contained in:
parent
8cd68919be
commit
af44ec1ed3
1 changed files with 3 additions and 3 deletions
|
@ -1925,8 +1925,8 @@ void GfxOpenGLS::destroyMesh(const Mesh *mesh) {
|
||||||
delete mud;
|
delete mud;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void readPixels(int x, int y, int width, int height, char *buffer) {
|
static void readPixels(int x, int y, int width, int height, byte *buffer) {
|
||||||
char *p = buffer;
|
byte *p = buffer;
|
||||||
for (int i = y; i < y + height; i++) {
|
for (int i = y; i < y + height; i++) {
|
||||||
glReadPixels(x, 479 - i, width, 1, GL_RGBA, GL_UNSIGNED_BYTE, p);
|
glReadPixels(x, 479 - i, width, 1, GL_RGBA, GL_UNSIGNED_BYTE, p);
|
||||||
p += width * 4;
|
p += width * 4;
|
||||||
|
@ -1944,7 +1944,7 @@ Bitmap *GfxOpenGLS::getScreenshot(int w, int h, bool useStored) {
|
||||||
|
|
||||||
delete[] buffer;
|
delete[] buffer;
|
||||||
} else {
|
} else {
|
||||||
readPixels(0, 0, _screenWidth, _screenHeight, reinterpret_cast<char *>(src.getRawBuffer()));
|
readPixels(0, 0, _screenWidth, _screenHeight, src.getRawBuffer());
|
||||||
}
|
}
|
||||||
return createScreenshotBitmap(src, w, h, false);
|
return createScreenshotBitmap(src, w, h, false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue