Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

[win32] fix size of DEVMODE struct. Fixes broken resolution switching #4379

Merged
merged 1 commit into from

1 participant

@jmarshallnz
Owner

No description provided.

@jmarshallnz
Owner

jenkins build this please

@jmarshallnz jmarshallnz added this to the Gotham13.0-beta2 milestone
@jmarshallnz jmarshallnz added the Gotham label
@jmarshallnz jmarshallnz merged commit 9025366 into xbmc:master
@jmarshallnz jmarshallnz deleted the jmarshallnz:win32_res_fix branch
@jmarshallnz jmarshallnz removed the Gotham label
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Mar 8, 2014
This page is out of date. Refresh to see the latest.
Showing with 6 additions and 6 deletions.
  1. +6 −6 xbmc/windowing/windows/WinSystemWin32.cpp
View
12 xbmc/windowing/windows/WinSystemWin32.cpp
@@ -358,8 +358,8 @@ RECT CWinSystemWin32::ScreenRect(int screen)
const MONITOR_DETAILS &details = GetMonitor(screen);
DEVMODEW sDevMode;
- ZeroMemory(&sDevMode, sizeof(DEVMODE));
- sDevMode.dmSize = sizeof(DEVMODE);
+ ZeroMemory(&sDevMode, sizeof(sDevMode));
+ sDevMode.dmSize = sizeof(sDevMode);
if(!EnumDisplaySettingsW(details.DeviceNameW.c_str(), ENUM_CURRENT_SETTINGS, &sDevMode))
CLog::Log(LOGERROR, "%s : EnumDisplaySettings failed with %d", __FUNCTION__, GetLastError());
@@ -445,8 +445,8 @@ bool CWinSystemWin32::ChangeResolution(RESOLUTION_INFO res)
const MONITOR_DETAILS &details = GetMonitor(res.iScreen);
DEVMODEW sDevMode;
- ZeroMemory(&sDevMode, sizeof(DEVMODE));
- sDevMode.dmSize = sizeof(DEVMODE);
+ ZeroMemory(&sDevMode, sizeof(sDevMode));
+ sDevMode.dmSize = sizeof(sDevMode);
// If we can't read the current resolution or any detail of the resolution is different than res
if (!EnumDisplaySettingsW(details.DeviceNameW.c_str(), ENUM_CURRENT_SETTINGS, &sDevMode) ||
@@ -455,8 +455,8 @@ bool CWinSystemWin32::ChangeResolution(RESOLUTION_INFO res)
((sDevMode.dmDisplayFlags & DM_INTERLACED) && !(res.dwFlags & D3DPRESENTFLAG_INTERLACED)) ||
(!(sDevMode.dmDisplayFlags & DM_INTERLACED) && (res.dwFlags & D3DPRESENTFLAG_INTERLACED)) )
{
- ZeroMemory(&sDevMode, sizeof(DEVMODE));
- sDevMode.dmSize = sizeof(DEVMODE);
+ ZeroMemory(&sDevMode, sizeof(sDevMode));
+ sDevMode.dmSize = sizeof(sDevMode);
sDevMode.dmDriverExtra = 0;
sDevMode.dmPelsWidth = res.iWidth;
sDevMode.dmPelsHeight = res.iHeight;
Something went wrong with that request. Please try again.