Author: cwittich
Date: Thu Dec 6 17:46:56 2007
New Revision: 31041
URL:
http://svn.reactos.org/svn/reactos?rev=31041&view=rev
Log:
zero DEVMODE and setting the correct size before calling ChangeDisplaySettings
Modified:
trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c
Modified: trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/directx/ddraw/Ddraw/dd…
==============================================================================
--- trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c (original)
+++ trunk/reactos/dll/directx/ddraw/Ddraw/ddraw_displaymode.c Thu Dec 6 17:46:56 2007
@@ -41,7 +41,6 @@
{
DevMode.dmSize = sizeof(DEVMODE);
- DevMode.dmDriverExtra = 0;
while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0) == TRUE)
{
@@ -139,7 +138,8 @@
LONG retval;
// Here we go
DEVMODE DevMode;
- DevMode.dmFields = 0;
+ ZeroMemory(&DevMode, sizeof(DEVMODE));
+ DevMode.dmSize = sizeof(DEVMODE);
if (dwHeight)
DevMode.dmFields |= DM_PELSHEIGHT;