Added ChangeDisplaySettingsEnum.Fullscreen to resolution changes. At last, windows stopped resizing themselves!
This commit is contained in:
parent
dfdac3b484
commit
c7e3f9f5e3
2 changed files with 3 additions and 2 deletions
|
@ -643,7 +643,7 @@ namespace OpenTK.Platform.Windows
|
|||
|
||||
[DllImport("user32.dll", SetLastError = true)]
|
||||
public static extern LONG ChangeDisplaySettingsEx(LPCTSTR lpszDeviceName, LPDEVMODE lpDevMode,
|
||||
HWND hwnd, DWORD dwflags, LPVOID lParam);
|
||||
HWND hwnd, ChangeDisplaySettingsEnum dwflags, LPVOID lParam);
|
||||
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -111,7 +111,8 @@ namespace OpenTK.Platform.Windows
|
|||
}
|
||||
|
||||
return Constants.DISP_CHANGE_SUCCESSFUL ==
|
||||
Functions.ChangeDisplaySettingsEx(available_device_names[device], mode, IntPtr.Zero, 0, IntPtr.Zero);
|
||||
Functions.ChangeDisplaySettingsEx(available_device_names[device], mode, IntPtr.Zero,
|
||||
ChangeDisplaySettingsEnum.Fullscreen, IntPtr.Zero);
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
Loading…
Reference in a new issue