Nathan Beckmann : gdiplus: Return an error for consecutive GdipLockBitmapBit calls.
Alexandre Julliard
julliard at winehq.org
Mon Mar 10 07:16:54 CDT 2008
Module: wine
Branch: master
Commit: e3f8f30a21349bb4f97554adb1f8ae81044e269e
URL: http://source.winehq.org/git/wine.git/?a=commit;h=e3f8f30a21349bb4f97554adb1f8ae81044e269e
Author: Nathan Beckmann <nathan.beckmann at gmail.com>
Date: Fri Mar 7 01:19:05 2008 -0800
gdiplus: Return an error for consecutive GdipLockBitmapBit calls.
---
dlls/gdiplus/image.c | 3 +--
dlls/gdiplus/tests/image.c | 6 ++----
2 files changed, 3 insertions(+), 6 deletions(-)
diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c
index 3ffb7c7..4f05ba0 100644
--- a/dlls/gdiplus/image.c
+++ b/dlls/gdiplus/image.c
@@ -114,8 +114,7 @@ GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap* bitmap, GDIPCONST GpRect* rect,
if(flags & ImageLockModeUserInputBuf)
return NotImplemented;
- if((bitmap->lockmode & ImageLockModeWrite) || (bitmap->lockmode &&
- (flags & ImageLockModeWrite)))
+ if(bitmap->lockmode)
return WrongState;
IPicture_get_Handle(bitmap->image.picture, &hbm);
diff --git a/dlls/gdiplus/tests/image.c b/dlls/gdiplus/tests/image.c
index d40f6c6..d51d94a 100644
--- a/dlls/gdiplus/tests/image.c
+++ b/dlls/gdiplus/tests/image.c
@@ -214,10 +214,8 @@ static void test_LockBits(void)
/* read x2 */
stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd);
expect(Ok, stat);
- todo_wine {
- stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd);
- expect(WrongState, stat);
- }
+ stat = GdipBitmapLockBits(bm, &rect, ImageLockModeRead, PixelFormat24bppRGB, &bd);
+ expect(WrongState, stat);
stat = GdipBitmapUnlockBits(bm, &bd);
expect(Ok, stat);
More information about the wine-cvs
mailing list