mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-24 15:45:34 +00:00
32 lines
824 B
C#
32 lines
824 B
C#
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Text;
|
||
|
|
||
|
using OpenTK.Platform.X;
|
||
|
|
||
|
namespace OpenTK
|
||
|
{
|
||
|
class X11Platform : PlatformSpecific
|
||
|
{
|
||
|
IntPtr display;
|
||
|
|
||
|
public X11Platform()
|
||
|
{
|
||
|
Type xplatui = Type.GetType("System.Windows.Forms.XplatUIX11, System.Windows.Forms");
|
||
|
if (xplatui != null)
|
||
|
{
|
||
|
Console.WriteLine("Got XplatUIX11 type.");
|
||
|
|
||
|
display = (IntPtr)xplatui.GetField("DisplayHandle",
|
||
|
System.Reflection.BindingFlags.Static |
|
||
|
System.Reflection.BindingFlags.NonPublic).GetValue(null);
|
||
|
}
|
||
|
}
|
||
|
|
||
|
public override bool IsIdle()
|
||
|
{
|
||
|
return (X11Api.Pending(display) == 0) ? true : false;
|
||
|
}
|
||
|
}
|
||
|
}
|