Commit 9a499217 authored by Stefan Dösinger's avatar Stefan Dösinger Committed by Alexandre Julliard

ddraw/tests: Don't insist on a different refresh rate if no refresh rate was requested.

d4fdb1f6 broke test_cursor_clipping by accident. It added a requirement that width, height and refresh rate are different from the old mode, but test_cursor_clipping does not use DDEDM_REFRESHRATES, so all refresh rates are 0. Signed-off-by: 's avatarStefan Dösinger <stefan@codeweavers.com> Signed-off-by: 's avatarHenri Verbeet <hverbeet@codeweavers.com> Signed-off-by: 's avatarAlexandre Julliard <julliard@winehq.org>
parent dc79534a
...@@ -15116,7 +15116,7 @@ static HRESULT CALLBACK find_different_mode_callback(DDSURFACEDESC *surface_desc ...@@ -15116,7 +15116,7 @@ static HRESULT CALLBACK find_different_mode_callback(DDSURFACEDESC *surface_desc
/* See comment in ddraw7 about the frequency. */ /* See comment in ddraw7 about the frequency. */
if (surface_desc->dwWidth != param->old_width && surface_desc->dwHeight != param->old_height && if (surface_desc->dwWidth != param->old_width && surface_desc->dwHeight != param->old_height &&
!compare_uint(surface_desc->dwRefreshRate, param->old_frequency, 1)) (!compare_uint(surface_desc->dwRefreshRate, param->old_frequency, 1) || !param->old_frequency))
{ {
param->new_width = surface_desc->dwWidth; param->new_width = surface_desc->dwWidth;
param->new_height = surface_desc->dwHeight; param->new_height = surface_desc->dwHeight;
......
...@@ -18153,7 +18153,7 @@ static HRESULT CALLBACK find_different_mode_callback(DDSURFACEDESC2 *surface_des ...@@ -18153,7 +18153,7 @@ static HRESULT CALLBACK find_different_mode_callback(DDSURFACEDESC2 *surface_des
/* See comment in ddraw7 about the frequency. */ /* See comment in ddraw7 about the frequency. */
if (surface_desc->dwWidth != param->old_width && surface_desc->dwHeight != param->old_height && if (surface_desc->dwWidth != param->old_width && surface_desc->dwHeight != param->old_height &&
!compare_uint(surface_desc->dwRefreshRate, param->old_frequency, 1)) (!compare_uint(surface_desc->dwRefreshRate, param->old_frequency, 1) || !param->old_frequency))
{ {
param->new_width = surface_desc->dwWidth; param->new_width = surface_desc->dwWidth;
param->new_height = surface_desc->dwHeight; param->new_height = surface_desc->dwHeight;
......
...@@ -18427,7 +18427,7 @@ static HRESULT CALLBACK find_different_mode_callback(DDSURFACEDESC2 *surface_des ...@@ -18427,7 +18427,7 @@ static HRESULT CALLBACK find_different_mode_callback(DDSURFACEDESC2 *surface_des
* set 60hz in the advanced display properties manually. Usually the restriction to one refresh * set 60hz in the advanced display properties manually. Usually the restriction to one refresh
* rate applies to laptop panels. */ * rate applies to laptop panels. */
if (surface_desc->dwWidth != param->old_width && surface_desc->dwHeight != param->old_height && if (surface_desc->dwWidth != param->old_width && surface_desc->dwHeight != param->old_height &&
!compare_uint(surface_desc->dwRefreshRate, param->old_frequency, 1)) (!compare_uint(surface_desc->dwRefreshRate, param->old_frequency, 1) || !param->old_frequency))
{ {
param->new_width = surface_desc->dwWidth; param->new_width = surface_desc->dwWidth;
param->new_height = surface_desc->dwHeight; param->new_height = surface_desc->dwHeight;
......
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