32 |
{ |
{ |
33 |
HBITMAP bitmap; |
HBITMAP bitmap; |
34 |
|
|
35 |
if ((cache_id < NUM_ELEMENTS(bmpcache)) |
if ((cache_id < NUM_ELEMENTS(bmpcache)) && (cache_idx < NUM_ELEMENTS(bmpcache[0]))) |
|
&& (cache_idx < NUM_ELEMENTS(bmpcache[0]))) |
|
36 |
{ |
{ |
37 |
bitmap = bmpcache[cache_id][cache_idx]; |
bitmap = bmpcache[cache_id][cache_idx]; |
38 |
if (bitmap != NULL) |
if (bitmap != NULL) |
49 |
{ |
{ |
50 |
HBITMAP old; |
HBITMAP old; |
51 |
|
|
52 |
if ((cache_id < NUM_ELEMENTS(bmpcache)) |
if ((cache_id < NUM_ELEMENTS(bmpcache)) && (cache_idx < NUM_ELEMENTS(bmpcache[0]))) |
|
&& (cache_idx < NUM_ELEMENTS(bmpcache[0]))) |
|
53 |
{ |
{ |
54 |
old = bmpcache[cache_id][cache_idx]; |
old = bmpcache[cache_id][cache_idx]; |
55 |
if (old != NULL) |
if (old != NULL) |
73 |
{ |
{ |
74 |
FONTGLYPH *glyph; |
FONTGLYPH *glyph; |
75 |
|
|
76 |
if ((font < NUM_ELEMENTS(fontcache)) |
if ((font < NUM_ELEMENTS(fontcache)) && (character < NUM_ELEMENTS(fontcache[0]))) |
|
&& (character < NUM_ELEMENTS(fontcache[0]))) |
|
77 |
{ |
{ |
78 |
glyph = &fontcache[font][character]; |
glyph = &fontcache[font][character]; |
79 |
if (glyph->pixmap != NULL) |
if (glyph->pixmap != NULL) |
91 |
{ |
{ |
92 |
FONTGLYPH *glyph; |
FONTGLYPH *glyph; |
93 |
|
|
94 |
if ((font < NUM_ELEMENTS(fontcache)) |
if ((font < NUM_ELEMENTS(fontcache)) && (character < NUM_ELEMENTS(fontcache[0]))) |
|
&& (character < NUM_ELEMENTS(fontcache[0]))) |
|
95 |
{ |
{ |
96 |
glyph = &fontcache[font][character]; |
glyph = &fontcache[font][character]; |
97 |
if (glyph->pixmap != NULL) |
if (glyph->pixmap != NULL) |
173 |
|
|
174 |
/* Store desktop data in the cache */ |
/* Store desktop data in the cache */ |
175 |
void |
void |
176 |
cache_put_desktop(uint32 offset, int cx, int cy, int scanline, |
cache_put_desktop(uint32 offset, int cx, int cy, int scanline, int bytes_per_pixel, uint8 * data) |
|
int bytes_per_pixel, uint8 * data) |
|
177 |
{ |
{ |
178 |
int length = cx * cy * bytes_per_pixel; |
int length = cx * cy * bytes_per_pixel; |
179 |
|
|