mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-23 06:55:37 +00:00
Added one default keyboard to X11Keyboard keyboard list.
This commit is contained in:
parent
005a7e924b
commit
b526c077d5
|
@ -27,22 +27,6 @@ namespace OpenTK.Input
|
|||
|
||||
public Keyboard()
|
||||
{
|
||||
if (Environment.OSVersion.Platform == PlatformID.Win32NT ||
|
||||
Environment.OSVersion.Platform == PlatformID.Win32Windows)
|
||||
{
|
||||
//keyboard = new OpenTK.Platform.Windows.WinRawKeyboard();
|
||||
}
|
||||
else if (Environment.OSVersion.Platform == PlatformID.Unix ||
|
||||
Environment.OSVersion.Platform == (PlatformID)128) // some older versions of Mono reported 128.
|
||||
{
|
||||
throw new NotImplementedException();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw new PlatformNotSupportedException(
|
||||
"Your operating system is not currently supported. We are sorry for the inconvenience."
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
|
|
@ -112,6 +112,11 @@ namespace OpenTK.Platform.X11
|
|||
//keysyms = (IntPtr[])Marshal.PtrToStructure(keysym_ptr, typeof(IntPtr[]));
|
||||
|
||||
API.Free(keysym_ptr);
|
||||
|
||||
Keyboard kb = new Keyboard();
|
||||
kb.Description = "Default X11 keyboard";
|
||||
kb.NumberOfKeys = lastKeyCode - firstKeyCode + 1;
|
||||
keyboards.Add(kb);
|
||||
}
|
||||
|
||||
#region internal bool ProcessKeyboardEvent(API.RawInput rin)
|
||||
|
|
Loading…
Reference in a new issue