diff --git a/libfreerdp-cache/bitmap.c b/libfreerdp-cache/bitmap.c index 3f0abf975..50775a9b1 100644 --- a/libfreerdp-cache/bitmap.c +++ b/libfreerdp-cache/bitmap.c @@ -38,7 +38,7 @@ void update_gdi_memblt(rdpUpdate* update, MEMBLT_ORDER* memblt) rdpBitmap* bitmap; rdpCache* cache = (rdpCache*) update->cache; - if (memblt->cacheIndex == 0xFF) + if (memblt->cacheId == 0xFF) bitmap = offscreen_cache_get(cache->offscreen, memblt->cacheIndex); else bitmap = bitmap_cache_get(cache->bitmap, memblt->cacheId, memblt->cacheIndex); @@ -52,7 +52,7 @@ void update_gdi_mem3blt(rdpUpdate* update, MEM3BLT_ORDER* mem3blt) rdpBitmap* bitmap; rdpCache* cache = (rdpCache*) update->cache; - if (mem3blt->cacheIndex == 0xFF) + if (mem3blt->cacheId == 0xFF) bitmap = offscreen_cache_get(cache->offscreen, mem3blt->cacheIndex); else bitmap = bitmap_cache_get(cache->bitmap, mem3blt->cacheId, mem3blt->cacheIndex); diff --git a/libfreerdp-cache/offscreen.c b/libfreerdp-cache/offscreen.c index e6c6a27f3..ca87f2e8a 100644 --- a/libfreerdp-cache/offscreen.c +++ b/libfreerdp-cache/offscreen.c @@ -32,6 +32,9 @@ void update_gdi_create_offscreen_bitmap(rdpUpdate* update, CREATE_OFFSCREEN_BITM IFCALL(cache->offscreen->OffscreenBitmapSize, update, &size); bitmap = (rdpBitmap*) xzalloc(size); + bitmap->width = create_offscreen_bitmap->cx; + bitmap->height = create_offscreen_bitmap->cy; + IFCALL(cache->offscreen->OffscreenBitmapNew, update, bitmap); prevBitmap = offscreen_cache_get(cache->offscreen, create_offscreen_bitmap->id);