mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-26 15:55:29 +00:00
d423f6e94c
Added IMouseDriver.cs and WinRawMouse.
46 lines
1.2 KiB
C#
46 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
using OpenTK.Input;
|
|
|
|
namespace OpenTK
|
|
{
|
|
public class InputDriver : IInputDriver
|
|
{
|
|
IInputDriver inputDriver;
|
|
|
|
public InputDriver(IntPtr parentHandle)
|
|
{
|
|
if (Environment.OSVersion.Version.Major > 5 ||
|
|
(Environment.OSVersion.Version.Major == 5 && Environment.OSVersion.Version.Minor >= 1))
|
|
{
|
|
inputDriver = new OpenTK.Platform.Windows.WinRawInput(parentHandle);
|
|
}
|
|
else
|
|
{
|
|
throw new PlatformNotSupportedException("Input is not implemented for platforms prior to Windows XP, yet.");
|
|
}
|
|
}
|
|
|
|
#region --- IInputDriver Members ---
|
|
|
|
IList<IInputDevice> IInputDriver.InputDevices
|
|
{
|
|
get { return inputDriver.InputDevices; }
|
|
}
|
|
|
|
public IList<Keyboard> Keyboard
|
|
{
|
|
get { return inputDriver.Keyboard; }
|
|
}
|
|
|
|
public IList<Keyboard> Mouse
|
|
{
|
|
get { throw new NotImplementedException(); }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|