Added minimal SystemEvents definition to allow compilation on mobile devices.
This commit is contained in:
parent
41e0c65dcb
commit
1e739bb4ff
2 changed files with 14 additions and 2 deletions
|
@ -2173,6 +2173,15 @@ namespace OpenTK
|
|||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region SystemEvents
|
||||
|
||||
sealed class SystemEvents
|
||||
{
|
||||
public static event EventHandler DisplaySettingsChanged;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
|
||||
// Need a different namespace to avoid clash with OpenTK.Graphics.
|
||||
|
|
|
@ -28,6 +28,9 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
#if !MINIMAL
|
||||
using Microsoft.Win32;
|
||||
#endif
|
||||
|
||||
namespace OpenTK.Platform.Windows
|
||||
{
|
||||
|
@ -40,7 +43,7 @@ namespace OpenTK.Platform.Windows
|
|||
public WinDisplayDeviceDriver()
|
||||
{
|
||||
RefreshDisplayDevices();
|
||||
Microsoft.Win32.SystemEvents.DisplaySettingsChanged +=
|
||||
SystemEvents.DisplaySettingsChanged +=
|
||||
HandleDisplaySettingsChanged;
|
||||
}
|
||||
|
||||
|
@ -173,7 +176,7 @@ namespace OpenTK.Platform.Windows
|
|||
|
||||
~WinDisplayDeviceDriver()
|
||||
{
|
||||
Microsoft.Win32.SystemEvents.DisplaySettingsChanged -=
|
||||
SystemEvents.DisplaySettingsChanged -=
|
||||
HandleDisplaySettingsChanged;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue