From 3658987dc0ecdfdf620a92b499744092b63a7143 Mon Sep 17 00:00:00 2001 From: the_fiddler Date: Thu, 31 Jan 2008 22:07:48 +0000 Subject: [PATCH] Added ChangeDisplaySettingsEnum.Fullscreen to resolution changes. At last, windows stopped resizing themselves! --- Source/OpenTK/Platform/Windows/API.cs | 2 +- Source/OpenTK/Platform/Windows/WinDisplayDevice.cs | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/OpenTK/Platform/Windows/API.cs b/Source/OpenTK/Platform/Windows/API.cs index 90731a70..4284ccff 100644 --- a/Source/OpenTK/Platform/Windows/API.cs +++ b/Source/OpenTK/Platform/Windows/API.cs @@ -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 diff --git a/Source/OpenTK/Platform/Windows/WinDisplayDevice.cs b/Source/OpenTK/Platform/Windows/WinDisplayDevice.cs index 1244e628..407c40f8 100644 --- a/Source/OpenTK/Platform/Windows/WinDisplayDevice.cs +++ b/Source/OpenTK/Platform/Windows/WinDisplayDevice.cs @@ -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