Set display frequency too in SetDisplayMode.

This commit is contained in:
Dylan Taft 2005-04-24 17:23:39 +00:00 committed by Alexandre Julliard
parent 791140468e
commit 14b3729ac3
1 changed files with 2 additions and 1 deletions

View File

@ -502,10 +502,11 @@ User_DirectDraw_SetDisplayMode(LPDIRECTDRAW7 iface, DWORD dwWidth,
LONG pitch;
TRACE("(%p)->(%ldx%ldx%ld,%ld Hz,%08lx)\n",This,dwWidth,dwHeight,dwBPP,dwRefreshRate,dwFlags);
devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;
devmode.dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFREQUENCY;
devmode.dmBitsPerPel = dwBPP;
devmode.dmPelsWidth = dwWidth;
devmode.dmPelsHeight = dwHeight;
devmode.dmDisplayFrequency = dwRefreshRate;
if (ChangeDisplaySettingsExW(NULL, &devmode, NULL, CDS_FULLSCREEN, NULL) != DISP_CHANGE_SUCCESSFUL)
return DDERR_INVALIDMODE;