mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 15:46:13 +00:00
zero DEVMODE and setting the correct size before calling ChangeDisplaySettings
svn path=/trunk/; revision=31041
This commit is contained in:
parent
3e7681fbee
commit
c73bd8cb3f
1 changed files with 2 additions and 2 deletions
|
@ -41,7 +41,6 @@ Main_DirectDraw_EnumDisplayModes(LPDDRAWI_DIRECTDRAW_INT This, DWORD dwFlags,
|
||||||
{
|
{
|
||||||
|
|
||||||
DevMode.dmSize = sizeof(DEVMODE);
|
DevMode.dmSize = sizeof(DEVMODE);
|
||||||
DevMode.dmDriverExtra = 0;
|
|
||||||
|
|
||||||
while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0) == TRUE)
|
while (EnumDisplaySettingsEx(NULL, iMode, &DevMode, 0) == TRUE)
|
||||||
{
|
{
|
||||||
|
@ -139,7 +138,8 @@ Main_DirectDraw_SetDisplayMode (LPDDRAWI_DIRECTDRAW_INT This, DWORD dwWidth, DWO
|
||||||
LONG retval;
|
LONG retval;
|
||||||
// Here we go
|
// Here we go
|
||||||
DEVMODE DevMode;
|
DEVMODE DevMode;
|
||||||
DevMode.dmFields = 0;
|
ZeroMemory(&DevMode, sizeof(DEVMODE));
|
||||||
|
DevMode.dmSize = sizeof(DEVMODE);
|
||||||
|
|
||||||
if (dwHeight)
|
if (dwHeight)
|
||||||
DevMode.dmFields |= DM_PELSHEIGHT;
|
DevMode.dmFields |= DM_PELSHEIGHT;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue