On Wed, Jul 19, 2017 at 12:11:28AM +0900, Akihiro Sagawa wrote:
To avoid division by zero (Bug 43369).
Signed-off-by: Akihiro Sagawa sagawa.aki@gmail.com
dlls/gdi32/driver.c | 2 +- 1 file changed, 1 insertion(+), 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;
Could you add a test (probably in dc.c:test_device_caps())?
The values returned by the testbot range from 1 -- 85, so 1 is as good a choice as any.
Huw.
On 19 July 2017 at 10:31, Huw Davies huw@codeweavers.com wrote:
The values returned by the testbot range from 1 -- 85, so 1 is as good a choice as any.
For what it's worth though, I think it shouldn't be much harder to return the real value from winex11.
On Wed, Jul 19, 2017 at 10:53:32AM +0200, Henri Verbeet wrote:
On 19 July 2017 at 10:31, Huw Davies huw@codeweavers.com wrote:
The values returned by the testbot range from 1 -- 85, so 1 is as good a choice as any.
For what it's worth though, I think it shouldn't be much harder to return the real value from winex11.
Yes, we can do that too, but we still need a default for the other drivers.
Huw.