mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 17:15:34 +00:00
Switch to EnumDisplayModesEx
Use EnumDisplayModesEx instead of EnumDisplayModes. This might help with issue #6.
This commit is contained in:
parent
a4f125f16e
commit
21a1ca8895
|
@ -926,6 +926,10 @@ namespace OpenTK.Platform.Windows
|
||||||
public static extern BOOL EnumDisplaySettingsEx([MarshalAs(UnmanagedType.LPTStr)] LPCTSTR lpszDeviceName, DisplayModeSettingsEnum iModeNum,
|
public static extern BOOL EnumDisplaySettingsEx([MarshalAs(UnmanagedType.LPTStr)] LPCTSTR lpszDeviceName, DisplayModeSettingsEnum iModeNum,
|
||||||
[In, Out] DeviceMode lpDevMode, DWORD dwFlags);
|
[In, Out] DeviceMode lpDevMode, DWORD dwFlags);
|
||||||
|
|
||||||
|
[DllImport("user32.dll", SetLastError = true, CharSet = CharSet.Auto)]
|
||||||
|
public static extern BOOL EnumDisplaySettingsEx([MarshalAs(UnmanagedType.LPTStr)] LPCTSTR lpszDeviceName, DWORD iModeNum,
|
||||||
|
[In, Out] DeviceMode lpDevMode, DWORD dwFlags);
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region GetMonitorInfo
|
#region GetMonitorInfo
|
||||||
|
|
|
@ -134,7 +134,7 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
opentk_dev_available_res.Clear();
|
opentk_dev_available_res.Clear();
|
||||||
mode_count = 0;
|
mode_count = 0;
|
||||||
while (Functions.EnumDisplaySettings(dev1.DeviceName.ToString(), mode_count++, monitor_mode))
|
while (Functions.EnumDisplaySettingsEx(dev1.DeviceName.ToString(), mode_count++, monitor_mode, 0))
|
||||||
{
|
{
|
||||||
VerifyMode(dev1, monitor_mode);
|
VerifyMode(dev1, monitor_mode);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue