SDL: Reserve correct number of bytes for video buffer allocation

This commit is contained in:
Jeffrey Pfau 2015-03-08 22:45:40 -07:00
parent 9a76ba6b43
commit 3f9abf2b05
1 changed files with 1 additions and 1 deletions

View File

@ -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);