Akihiro Sagawa : gdi32: Return non-zero VREFRESH value for display devices.
Alexandre Julliard
julliard at winehq.org
Fri Jul 21 14:09:20 CDT 2017
Module: wine
Branch: master
Commit: 22135ba583f2881d16b9370aa6de7513bbc59f10
URL: http://source.winehq.org/git/wine.git/?a=commit;h=22135ba583f2881d16b9370aa6de7513bbc59f10
Author: Akihiro Sagawa <sagawa.aki at gmail.com>
Date: Fri Jul 21 22:58:04 2017 +0900
gdi32: Return non-zero VREFRESH value for display devices.
Signed-off-by: Akihiro Sagawa <sagawa.aki at gmail.com>
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdi32/driver.c | 2 +-
dlls/gdi32/tests/dc.c | 6 ++++++
2 files changed, 7 insertions(+), 1 deletion(-)
diff --git a/dlls/gdi32/driver.c b/dlls/gdi32/driver.c
index fe7812c..6a3975a 100644
--- a/dlls/gdi32/driver.c
+++ b/dlls/gdi32/driver.c
@@ -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;
diff --git a/dlls/gdi32/tests/dc.c b/dlls/gdi32/tests/dc.c
index add2c04..3c1fa60 100644
--- a/dlls/gdi32/tests/dc.c
+++ b/dlls/gdi32/tests/dc.c
@@ -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,
More information about the wine-cvs
mailing list