Skip to content

Commit

Permalink
winex11.drv: Use the default frequency in ChangeDisplaySettingsExW() …
Browse files Browse the repository at this point in the history
…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>
  • Loading branch information
zzhiyi authored and julliard committed Jun 12, 2020
1 parent 203bd05 commit c4a01d0
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
1 change: 0 additions & 1 deletion dlls/user32/tests/monitor.c
Expand Up @@ -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 ||
Expand Down
2 changes: 1 addition & 1 deletion dlls/winex11.drv/settings.c
Expand Up @@ -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;
Expand Down

0 comments on commit c4a01d0

Please sign in to comment.