winex11.drv: Use the default frequency in ChangeDisplaySettingsExW() if dmDisplayFrequency is 1.

0 or 1 in dmDisplayFrequency means to use the default frequency.

Fix Disgaea PC and Ostriv failing to launch in exclusive fullscreen mode.

Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Zhiyi Zhang 2020-06-12 15:29:33 +08:00 committed by Alexandre Julliard
parent 203bd057cf
commit c4a01d0a65
2 changed files with 1 additions and 2 deletions

View File

@ -448,7 +448,6 @@ static void test_ChangeDisplaySettingsEx(void)
dm.dmDisplayFrequency = vid_modes_test[i].freq;
dm.dmFields = vid_modes_test[i].fields;
res = ChangeDisplaySettingsExA(NULL, &dm, NULL, CDS_TEST, NULL);
todo_wine_if(i == 2)
ok(vid_modes_test[i].must_succeed ?
(res == DISP_CHANGE_SUCCESSFUL || res == DISP_CHANGE_RESTART) :
(res == DISP_CHANGE_SUCCESSFUL || res == DISP_CHANGE_RESTART ||

View File

@ -420,7 +420,7 @@ LONG CDECL X11DRV_ChangeDisplaySettingsEx( LPCWSTR devname, LPDEVMODEW devmode,
continue;
}
if ((devmode->dmFields & DM_DISPLAYFREQUENCY) && (dd_modes[i].refresh_rate != 0) &&
devmode->dmDisplayFrequency != 0)
devmode->dmDisplayFrequency != 0 && devmode->dmDisplayFrequency != 1)
{
if (devmode->dmDisplayFrequency != dd_modes[i].refresh_rate)
continue;