mirror of
https://github.com/Ryujinx/Opentk.git
synced 2024-12-28 13:05:31 +00:00
6812739418
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
|
|
}
|
|
}
|