--- sourceforge.net/trunk/rdesktop/cache.c 2004/06/27 19:38:18 729 +++ sourceforge.net/trunk/rdesktop/cache.c 2004/06/29 16:22:41 730 @@ -32,6 +32,7 @@ /* BITMAP CACHE */ static BMPCACHEENTRY g_bmpcache[3][0xa00]; +static HBITMAP g_volatile_bc[3]; /* Remove the least-recently used bitmap from the cache */ void @@ -75,6 +76,10 @@ return *pbitmap; } } + else if ((cache_id < NUM_ELEMENTS(g_volatile_bc)) && (cache_idx == 0x7fff)) + { + return g_volatile_bc[cache_id]; + } error("get bitmap %d:%d\n", cache_id, cache_idx); return NULL; @@ -102,6 +107,13 @@ g_bmpcache[cache_id][cache_idx].bitmap = bitmap; g_bmpcache[cache_id][cache_idx].usage = stamp; } + else if ((cache_id < NUM_ELEMENTS(g_volatile_bc)) && (cache_idx == 0x7fff)) + { + old = g_volatile_bc[cache_id]; + if (old != NULL) + ui_destroy_bitmap(old); + g_volatile_bc[cache_id] = bitmap; + } else { error("put bitmap %d:%d\n", cache_id, cache_idx);