diff options
author | Jens Arnold <amiconn@rockbox.org> | 2006-04-04 19:39:31 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2006-04-04 19:39:31 +0000 |
commit | d0136ed145d09b66bd97061c57815d6d1a80e296 (patch) | |
tree | 0567e765791717107266879983781ec3a972c77a /apps | |
parent | ba3289dc2b5adfa63e264a6c9efd987c66e868b6 (diff) | |
download | rockbox-d0136ed145d09b66bd97061c57815d6d1a80e296.tar.gz rockbox-d0136ed145d09b66bd97061c57815d6d1a80e296.zip |
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
Diffstat (limited to 'apps')
-rw-r--r-- | apps/plugins/doom/i_video.c | 11 |
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" |
73 | static unsigned char graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */ | 76 | static unsigned char graybuffer[LCD_HEIGHT*LCD_WIDTH]; /* off screen buffer */ |
74 | static unsigned char *gbuf; | 77 | static unsigned char *gbuf; |
75 | static 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 |