summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-04-04 19:39:31 +0000
committerJens Arnold <amiconn@rockbox.org>2006-04-04 19:39:31 +0000
commitd0136ed145d09b66bd97061c57815d6d1a80e296 (patch)
tree0567e765791717107266879983781ec3a972c77a
parentba3289dc2b5adfa63e264a6c9efd987c66e868b6 (diff)
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.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@9503 a1c6a512-1295-4272-9138-f99709370657
-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 @@
* GNU General Public License for more details.
*
* $Log$
- * Revision 1.10 2006/04/04 12:00:53 dave
+ * Revision 1.11 2006/04/04 19:39:31 amiconn
+ * 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.
+ *
+ * Revision 1.10 2006-04-04 12:00:53 dave
* iPod: Make the hold switch bring up the in-game menu.
*
* Revision 1.9 2006-04-03 20:03:02 kkurbjun
@@ -72,7 +75,7 @@
#include "../lib/gray.h"
static unsigned char graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */
static unsigned char *gbuf;
-static unsigned int gbuf_size = 0;
+#define GRAYBUFSIZE (LCD_WIDTH*LCD_HEIGHT*4+200)
#endif
#if defined(CPU_COLDFIRE)
@@ -451,8 +454,8 @@ void I_InitGraphics(void)
/* Note: The other screens are allocated as needed */
#ifndef HAVE_LCD_COLOR
- gbuf=malloc(220000); // give a bunch
- gray_init(rb, gbuf, gbuf_size, false, LCD_WIDTH, LCD_HEIGHT/8, 32, NULL);
+ gbuf=malloc(GRAYBUFSIZE);
+ gray_init(rb, gbuf, GRAYBUFSIZE, false, LCD_WIDTH, LCD_HEIGHT/8, 32, NULL);
/* switch on grayscale overlay */
gray_show(true);
#endif