gdi32: Make the PS_NULL test pass under Wine.
This commit is contained in:
parent
8c90767c3d
commit
40e1e39785
|
@ -80,6 +80,12 @@ HPEN WINAPI CreatePenIndirect( const LOGPEN * pen )
|
||||||
PENOBJ * penPtr;
|
PENOBJ * penPtr;
|
||||||
HPEN hpen;
|
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,
|
if (!(penPtr = GDI_AllocObject( sizeof(PENOBJ), PEN_MAGIC, (HGDIOBJ *)&hpen,
|
||||||
&pen_funcs ))) return 0;
|
&pen_funcs ))) return 0;
|
||||||
if (pen->lopnStyle == PS_USERSTYLE || pen->lopnStyle == PS_ALTERNATE)
|
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 */
|
/* for some reason XP differentiates PS_NULL here */
|
||||||
if (pen[i].style == PS_NULL)
|
if (pen[i].style == PS_NULL)
|
||||||
{
|
{
|
||||||
todo_wine
|
|
||||||
ok(hpen == GetStockObject(NULL_PEN), "hpen should be a stock NULL_PEN\n");
|
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(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);
|
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)
|
if (pen[i].style == PS_NULL)
|
||||||
{
|
{
|
||||||
ok(obj_type == OBJ_PEN, "wrong object type %u\n", obj_type);
|
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");
|
ok(hpen == GetStockObject(NULL_PEN), "hpen should be a stock NULL_PEN\n");
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
Loading…
Reference in New Issue