mirror of https://github.com/mgba-emu/mgba.git
SDL: Reserve correct number of bytes for video buffer allocation
This commit is contained in:
parent
9a76ba6b43
commit
3f9abf2b05
|
@ -59,7 +59,7 @@ bool GBASDLInit(struct SDLSoftwareRenderer* renderer) {
|
|||
#endif
|
||||
#endif
|
||||
|
||||
renderer->d.outputBuffer = malloc(VIDEO_HORIZONTAL_PIXELS * VIDEO_VERTICAL_PIXELS * 4);
|
||||
renderer->d.outputBuffer = malloc(VIDEO_HORIZONTAL_PIXELS * VIDEO_VERTICAL_PIXELS * BYTES_PER_PIXEL);
|
||||
renderer->d.outputBufferStride = VIDEO_HORIZONTAL_PIXELS;
|
||||
glGenTextures(1, &renderer->tex);
|
||||
glBindTexture(GL_TEXTURE_2D, renderer->tex);
|
||||
|
|
Loading…
Reference in New Issue