From 5d6ca5c7dacc0bb0fbbfb413698ef177300d6b77 Mon Sep 17 00:00:00 2001 From: "Stefanos A." Date: Thu, 14 Nov 2013 01:43:40 +0100 Subject: [PATCH] Added GetDeviceCaps (windows platform) We will use this method to read out the logical DPI of the monitor and scale window elements accordingly. --- Source/OpenTK/Platform/Windows/API.cs | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Source/OpenTK/Platform/Windows/API.cs b/Source/OpenTK/Platform/Windows/API.cs index 85c576b8..8ad95548 100644 --- a/Source/OpenTK/Platform/Windows/API.cs +++ b/Source/OpenTK/Platform/Windows/API.cs @@ -977,6 +977,13 @@ namespace OpenTK.Platform.Windows #endregion + #region GetDeviceCaps + + [DllImport("gdi32.dll", CharSet = CharSet.Auto, SetLastError = true, ExactSpelling = true)] + public static extern int GetDeviceCaps(IntPtr hDC, DeviceCaps nIndex); + + #endregion + #endregion #region Input functions @@ -2971,6 +2978,16 @@ namespace OpenTK.Platform.Windows #endregion + #region DeviceCaps + + enum DeviceCaps + { + LogPixelsX = 88, + LogPixelsY = 90 + } + + #endregion + #region internal enum DisplayModeSettingsEnum internal enum DisplayModeSettingsEnum