[DDRAW] Fix two duplicate DDSD_WIDTH uses.
authorSerge Gautherie <reactos-git_serge_171003@gautherie.fr>
Wed, 10 Oct 2018 23:46:44 +0000 (01:46 +0200)
committerHermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Sat, 8 Dec 2018 16:10:31 +0000 (17:10 +0100)
Thanks to Kudratov Olimjon who reported this.
CORE-8545

dll/directx/ddraw/Ddraw/ddraw_displaymode.c

index 5c6385b..5b5c910 100644 (file)
@@ -51,7 +51,7 @@ Main_DirectDraw_EnumDisplayModes(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags,
                 iMode++;
 
                 SurfaceDesc.dwSize = sizeof (DDSURFACEDESC);
-                SurfaceDesc.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_REFRESHRATE | DDSD_WIDTH | DDSD_PIXELFORMAT;
+                SurfaceDesc.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT | DDSD_PITCH | DDSD_REFRESHRATE;
                 SurfaceDesc.dwHeight = DevMode.dmPelsHeight;
                 SurfaceDesc.dwWidth = DevMode.dmPelsWidth;
                 SurfaceDesc.lPitch = DevMode.dmPelsWidth * DevMode.dmBitsPerPel / 8;
@@ -149,7 +149,7 @@ Main_DirectDraw_EnumDisplayModes4(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags,
                 iMode++;
 
                 SurfaceDesc.dwSize = sizeof (DDSURFACEDESC2);
-                SurfaceDesc.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_REFRESHRATE | DDSD_WIDTH | DDSD_PIXELFORMAT;
+                SurfaceDesc.dwFlags = DDSD_HEIGHT | DDSD_WIDTH | DDSD_PIXELFORMAT | DDSD_PITCH | DDSD_REFRESHRATE;
                 SurfaceDesc.dwHeight = DevMode.dmPelsHeight;
                 SurfaceDesc.dwWidth = DevMode.dmPelsWidth;
                 SurfaceDesc.lPitch = DevMode.dmPelsWidth * DevMode.dmBitsPerPel / 8;