gdi32: Return non-zero VREFRESH value for display devices.

Signed-off-by: Akihiro Sagawa <sagawa.aki@gmail.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Akihiro Sagawa 2017-07-21 22:58:04 +09:00 committed by Alexandre Julliard
parent 90da210cb0
commit 22135ba583
2 changed files with 7 additions and 1 deletions

View file

@ -344,7 +344,7 @@ static INT nulldrv_GetDeviceCaps( PHYSDEV dev, INT cap )
case PHYSICALOFFSETY: return 0;
case SCALINGFACTORX: return 0;
case SCALINGFACTORY: return 0;
case VREFRESH: return 0;
case VREFRESH: return GetDeviceCaps( dev->hdc, TECHNOLOGY ) == DT_RASDISPLAY ? 1 : 0;
case DESKTOPVERTRES: return GetDeviceCaps( dev->hdc, VERTRES );
case DESKTOPHORZRES: return GetDeviceCaps( dev->hdc, HORZRES );
case BLTALIGNMENT: return 0;

View file

@ -400,6 +400,12 @@ static void test_device_caps( HDC hdc, HDC ref_dc, const char *descr, int scale
case LOGPIXELSY:
hdc_caps *= scale;
break;
case VREFRESH:
if (GetDeviceCaps( hdc, TECHNOLOGY ) == DT_RASDISPLAY)
ok( hdc_caps > 0, "expected a positive value on %s, got %d\n", descr, hdc_caps );
else
ok( hdc_caps == 0, "expected 0 on %s, got %d\n", descr, hdc_caps );
break;
}
ok( abs(hdc_caps - GetDeviceCaps( ref_dc, caps[i] )) <= precision,