Dmitry Timoshkov : gdi32: Make the PS_NULL test pass under Wine.
Alexandre Julliard
julliard at winehq.org
Wed Oct 1 14:09:23 CDT 2008
Module: wine
Branch: master
Commit: 40e1e397856589e128ba65d6633c570ac246e3e4
URL: http://source.winehq.org/git/wine.git/?a=commit;h=40e1e397856589e128ba65d6633c570ac246e3e4
Author: Dmitry Timoshkov <dmitry at codeweavers.com>
Date: Wed Oct 1 03:09:02 2008 +0900
gdi32: Make the PS_NULL test pass under Wine.
---
dlls/gdi32/pen.c | 6 ++++++
dlls/gdi32/tests/pen.c | 2 --
2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/dlls/gdi32/pen.c b/dlls/gdi32/pen.c
index 6fe39af..a308f2b 100644
--- a/dlls/gdi32/pen.c
+++ b/dlls/gdi32/pen.c
@@ -80,6 +80,12 @@ HPEN WINAPI CreatePenIndirect( const LOGPEN * pen )
PENOBJ * penPtr;
HPEN hpen;
+ if (pen->lopnStyle == PS_NULL)
+ {
+ hpen = GetStockObject(NULL_PEN);
+ if (hpen) return hpen;
+ }
+
if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, (HGDIOBJ *)&hpen,
&pen_funcs ))) return 0;
if (pen->lopnStyle == PS_USERSTYLE || pen->lopnStyle == PS_ALTERNATE)
diff --git a/dlls/gdi32/tests/pen.c b/dlls/gdi32/tests/pen.c
index 144875b..64304fa 100644
--- a/dlls/gdi32/tests/pen.c
+++ b/dlls/gdi32/tests/pen.c
@@ -144,7 +144,6 @@ static void test_logpen(void)
/* for some reason XP differentiates PS_NULL here */
if (pen[i].style == PS_NULL)
{
- todo_wine
ok(hpen == GetStockObject(NULL_PEN), "hpen should be a stock NULL_PEN\n");
ok(size == sizeof(EXTLOGPEN), "GetObject returned %d, error %d\n", size, GetLastError());
ok(elp.elpPenStyle == pen[i].ret_style, "expected %u, got %u\n", pen[i].ret_style, elp.elpPenStyle);
@@ -210,7 +209,6 @@ static void test_logpen(void)
if (pen[i].style == PS_NULL)
{
ok(obj_type == OBJ_PEN, "wrong object type %u\n", obj_type);
- todo_wine
ok(hpen == GetStockObject(NULL_PEN), "hpen should be a stock NULL_PEN\n");
}
else
More information about the wine-cvs
mailing list