Commit 58eb96c9 authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

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.
parent d086af1d
......@@ -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;
......
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment