Fixed bitmap context for 15bit color depth

This commit is contained in:
Armin Novak 2015-02-26 18:01:05 +01:00
parent ff6dbb049c
commit 8b5f2c97ce

View File

@ -126,7 +126,7 @@ static void ios_create_bitmap_context(mfInfo* mfi)
rdpGdi* gdi = mfi->instance->context->gdi;
CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
if(gdi->dstBpp == 16)
if (gdi->bytesPerPixel == 2)
mfi->bitmap_context = CGBitmapContextCreate(gdi->primary_buffer, gdi->width, gdi->height, 5, gdi->width * 2, colorSpace, kCGBitmapByteOrder16Little | kCGImageAlphaNoneSkipFirst);
else
mfi->bitmap_context = CGBitmapContextCreate(gdi->primary_buffer, gdi->width, gdi->height, 8, gdi->width * 4, colorSpace, kCGBitmapByteOrder32Little | kCGImageAlphaNoneSkipFirst);