From: Alexandros Frantzis alexandros.frantzis@collabora.com
Round the Wayland refresh rate instead of floor-ing it, to report a more accurate win32 display frequency. This can slightly improve FPS values in games that use the reported display frequency to drive their rendering.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56542 --- dlls/winewayland.drv/display.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/dlls/winewayland.drv/display.c b/dlls/winewayland.drv/display.c index 5d65fd01c54..851c9638252 100644 --- a/dlls/winewayland.drv/display.c +++ b/dlls/winewayland.drv/display.c @@ -232,7 +232,8 @@ static void populate_devmode(struct wayland_output_mode *output_mode, DEVMODEW * mode->dmBitsPerPel = 32; mode->dmPelsWidth = output_mode->width; mode->dmPelsHeight = output_mode->height; - mode->dmDisplayFrequency = output_mode->refresh / 1000; + /* Round the refresh rate to calculate the win32 display frequency. */ + mode->dmDisplayFrequency = (output_mode->refresh + 500) / 1000; }
static void wayland_add_device_modes(const struct gdi_device_manager *device_manager,