Commit 40e1e397 authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

gdi32: Make the PS_NULL test pass under Wine.

parent 8c90767c
......@@ -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)
......
......@@ -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
......
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