summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/doom/i_video.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c
index 936f496276..69583f5e36 100644
--- a/apps/plugins/doom/i_video.c
+++ b/apps/plugins/doom/i_video.c
@@ -16,7 +16,10 @@
16 * GNU General Public License for more details. 16 * GNU General Public License for more details.
17 * 17 *
18 * $Log$ 18 * $Log$
19 * Revision 1.10 2006/04/04 12:00:53 dave 19 * Revision 1.11 2006/04/04 19:39:31 amiconn
20 * Doom on H1x0: Don't waste memory, the grayscale lib doesn't need that much, but properly tell the lib how much memory it may use.
21 *
22 * Revision 1.10 2006-04-04 12:00:53 dave
20 * iPod: Make the hold switch bring up the in-game menu. 23 * iPod: Make the hold switch bring up the in-game menu.
21 * 24 *
22 * Revision 1.9 2006-04-03 20:03:02 kkurbjun 25 * Revision 1.9 2006-04-03 20:03:02 kkurbjun
@@ -72,7 +75,7 @@
72#include "../lib/gray.h" 75#include "../lib/gray.h"
73static unsigned char graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */ 76static unsigned char graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */
74static unsigned char *gbuf; 77static unsigned char *gbuf;
75static unsigned int gbuf_size = 0; 78#define GRAYBUFSIZE (LCD_WIDTH*LCD_HEIGHT*4+200)
76#endif 79#endif
77 80
78#if defined(CPU_COLDFIRE) 81#if defined(CPU_COLDFIRE)
@@ -451,8 +454,8 @@ void I_InitGraphics(void)
451 /* Note: The other screens are allocated as needed */ 454 /* Note: The other screens are allocated as needed */
452 455
453#ifndef HAVE_LCD_COLOR 456#ifndef HAVE_LCD_COLOR
454 gbuf=malloc(220000); // give a bunch 457 gbuf=malloc(GRAYBUFSIZE);
455 gray_init(rb, gbuf, gbuf_size, false, LCD_WIDTH, LCD_HEIGHT/8, 32, NULL); 458 gray_init(rb, gbuf, GRAYBUFSIZE, false, LCD_WIDTH, LCD_HEIGHT/8, 32, NULL);
456 /* switch on grayscale overlay */ 459 /* switch on grayscale overlay */
457 gray_show(true); 460 gray_show(true);
458#endif 461#endif