Commit d99f6821 authored by Alexandre Julliard's avatar Alexandre Julliard

gdi32: Don't return screen resolution on printer devices.

parent fc62dac4
......@@ -355,7 +355,7 @@ static INT nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap )
case SCALINGFACTORY: return 0;
case VREFRESH: return GetDeviceCaps( dev->hdc, TECHNOLOGY ) == DT_RASDISPLAY ? 1 : 0;
case DESKTOPHORZRES:
if (pGetSystemMetrics)
if (GetDeviceCaps( dev->hdc, TECHNOLOGY ) == DT_RASDISPLAY && pGetSystemMetrics)
{
DPI_AWARENESS_CONTEXT context;
UINT ret;
......@@ -366,7 +366,7 @@ static INT nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap )
}
return GetDeviceCaps( dev->hdc, HORZRES );
case DESKTOPVERTRES:
if (pGetSystemMetrics)
if (GetDeviceCaps( dev->hdc, TECHNOLOGY ) == DT_RASDISPLAY && pGetSystemMetrics)
{
DPI_AWARENESS_CONTEXT context;
UINT ret;
......
......@@ -471,6 +471,12 @@ static void test_device_caps( HDC hdc, HDC ref_dc, const char *descr, int scale
}
else
{
ok( GetDeviceCaps( ref_dc, DESKTOPHORZRES ) == GetDeviceCaps( ref_dc, HORZRES ),
"Got DESKTOPHORZRES %d on %s, expected %d\n",
GetDeviceCaps( ref_dc, DESKTOPHORZRES ), descr, GetDeviceCaps( ref_dc, HORZRES ));
ok( GetDeviceCaps( ref_dc, DESKTOPVERTRES ) == GetDeviceCaps( ref_dc, VERTRES ),
"Got DESKTOPVERTRES %d on %s, expected %d\n",
GetDeviceCaps( ref_dc, DESKTOPVERTRES ), descr, GetDeviceCaps( ref_dc, VERTRES ));
SetRect( &ref_rect, 0, 0, GetDeviceCaps( ref_dc, DESKTOPHORZRES ),
GetDeviceCaps( ref_dc, DESKTOPVERTRES ) );
}
......
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