From 94c120614b653eb4785264d8065be6c3886c9299 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Thu, 24 Feb 2011 16:09:17 -0600 Subject: [PATCH 2/5] gdiplus: Copy the bits on bitmap unlock if the write flag is set. The read and write flags are independent, so a read flag being set doesn't imply we can quit early. --- dlls/gdiplus/image.c | 2 +- dlls/gdiplus/tests/image.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index a69046d..3c4e9bf 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -1048,7 +1048,7 @@ GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap* bitmap, if(lockeddata->Reserved & ImageLockModeUserInputBuf) return NotImplemented; - if(lockeddata->Reserved & ImageLockModeRead){ + if(!(lockeddata->Reserved & ImageLockModeWrite)){ if(!(--bitmap->numlocks)) bitmap->lockmode = 0; diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c index dde040a..82d7588 100644 --- a/dlls/gdiplus/tests/image.c +++ b/dlls/gdiplus/tests/image.c @@ -657,7 +657,7 @@ static void test_LockBits(void) stat = GdipBitmapGetPixel(bm, 2, 3, &color); expect(Ok, stat); - todo_wine expect(0xffff8800, color); + expect(0xffff8800, color); /* write, conversion */ stat = GdipBitmapLockBits(bm, &rect, ImageLockModeWrite, PixelFormat32bppARGB, &bd); -- 1.7.1