mirror of
https://github.com/Ryujinx/Opentk.git
synced 2025-01-14 09:55:27 +00:00
2f64fb372e
Updated the ExampleLauncher to not process exceptions. Updated the IExample interface to contain the Launch method. Updated examples and the ExampleLauncher according to the IExample interface. Synced with gl3 branch.
41 lines
1 KiB
C#
41 lines
1 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
using OpenTK.Input;
|
|
|
|
namespace OpenTK
|
|
{
|
|
public class InputDevices : IInputDriver
|
|
{
|
|
IInputDriver inputDriver;
|
|
|
|
public InputDevices()
|
|
{
|
|
if (Environment.OSVersion.Version.Major > 5 ||
|
|
(Environment.OSVersion.Version.Major == 5 && Environment.OSVersion.Version.Minor >= 1))
|
|
{
|
|
inputDriver = new OpenTK.Platform.Windows.WinRawInput();
|
|
}
|
|
else
|
|
{
|
|
throw new PlatformNotSupportedException("Input is not implemented for platforms prior to Windows XP, yet.");
|
|
}
|
|
}
|
|
|
|
#region --- IInputDriver Members ---
|
|
|
|
IList<OpenTK.Input.IInputDevice> OpenTK.Input.IInputDriver.InputDevices
|
|
{
|
|
get { return inputDriver.InputDevices; }
|
|
}
|
|
|
|
public IList<OpenTK.Input.IKeyboard> Keyboards
|
|
{
|
|
get { return inputDriver.Keyboards; }
|
|
}
|
|
|
|
#endregion
|
|
}
|
|
}
|