diff render_sdl.c @ 502:7fdfcced65b6

Fix allocation and memset size for field buffers when using OpenGL
author Mike Pavone <pavone@retrodev.com>
date Tue, 29 Oct 2013 23:13:15 -0700
parents 251fe7a75a14
children b7b7a1cab44a
line wrap: on
line diff
--- a/render_sdl.c	Tue Oct 29 19:11:45 2013 -0700
+++ b/render_sdl.c	Tue Oct 29 23:13:15 2013 -0700
@@ -159,9 +159,9 @@
 {
 #ifndef DISABLE_OPENGL
 	if (render_gl) {
-		context->oddbuf = context->framebuf = malloc(320 * 240 * 4 * 2);
-		memset(context->oddbuf, 0, 320 * 240 * 4 * 2);
-		context->evenbuf = ((char *)context->oddbuf) + 320 * 240 * 4;
+		context->oddbuf = context->framebuf = malloc(512 * 256 * 4 * 2);
+		memset(context->oddbuf, 0, 512 * 256 * 4 * 2);
+		context->evenbuf = ((char *)context->oddbuf) + 512 * 256 * 4;
 		glGenTextures(3, textures);
 		for (int i = 0; i < 3; i++)
 		{