mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-26 23:01:11 +00:00
Added minimal SystemEvents definition to allow compilation on mobile devices.
This commit is contained in:
parent
41e0c65dcb
commit
1e739bb4ff
|
@ -2173,6 +2173,15 @@ namespace OpenTK
|
||||||
}
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
#region SystemEvents
|
||||||
|
|
||||||
|
sealed class SystemEvents
|
||||||
|
{
|
||||||
|
public static event EventHandler DisplaySettingsChanged;
|
||||||
|
}
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
|
|
||||||
// Need a different namespace to avoid clash with OpenTK.Graphics.
|
// Need a different namespace to avoid clash with OpenTK.Graphics.
|
||||||
|
|
|
@ -28,6 +28,9 @@
|
||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Diagnostics;
|
using System.Diagnostics;
|
||||||
|
#if !MINIMAL
|
||||||
|
using Microsoft.Win32;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace OpenTK.Platform.Windows
|
namespace OpenTK.Platform.Windows
|
||||||
{
|
{
|
||||||
|
@ -40,7 +43,7 @@ namespace OpenTK.Platform.Windows
|
||||||
public WinDisplayDeviceDriver()
|
public WinDisplayDeviceDriver()
|
||||||
{
|
{
|
||||||
RefreshDisplayDevices();
|
RefreshDisplayDevices();
|
||||||
Microsoft.Win32.SystemEvents.DisplaySettingsChanged +=
|
SystemEvents.DisplaySettingsChanged +=
|
||||||
HandleDisplaySettingsChanged;
|
HandleDisplaySettingsChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -173,7 +176,7 @@ namespace OpenTK.Platform.Windows
|
||||||
|
|
||||||
~WinDisplayDeviceDriver()
|
~WinDisplayDeviceDriver()
|
||||||
{
|
{
|
||||||
Microsoft.Win32.SystemEvents.DisplaySettingsChanged -=
|
SystemEvents.DisplaySettingsChanged -=
|
||||||
HandleDisplaySettingsChanged;
|
HandleDisplaySettingsChanged;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue