From 8f7eebb58d3213c15a683447698b800e75a08cee Mon Sep 17 00:00:00 2001 From: thefiddler Date: Mon, 23 Dec 2013 19:19:41 +0100 Subject: [PATCH] Enabled HIDInput IGamePadDriver implementation --- Source/OpenTK/Platform/MacOS/HIDInput.cs | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/Source/OpenTK/Platform/MacOS/HIDInput.cs b/Source/OpenTK/Platform/MacOS/HIDInput.cs index 8e3c6011..c3e55612 100755 --- a/Source/OpenTK/Platform/MacOS/HIDInput.cs +++ b/Source/OpenTK/Platform/MacOS/HIDInput.cs @@ -50,7 +50,7 @@ namespace OpenTK.Platform.MacOS // Requires Mac OS X 10.5 or higher. // Todo: create a driver for older installations. Maybe use CGGetLastMouseDelta for that? - class HIDInput : IInputDriver2, IMouseDriver2, IKeyboardDriver2/*, IGamePadDriver*/ + class HIDInput : IInputDriver2, IMouseDriver2, IKeyboardDriver2, IGamePadDriver { #region Fields @@ -291,7 +291,7 @@ namespace OpenTK.Platform.MacOS public IMouseDriver2 MouseDriver { get { return this; } } public IKeyboardDriver2 KeyboardDriver { get { return this; } } - public IGamePadDriver GamePadDriver { get { throw new NotImplementedException(); } } + public IGamePadDriver GamePadDriver { get { return this; } } #endregion @@ -366,6 +366,25 @@ namespace OpenTK.Platform.MacOS #endregion + #region IGamePadDriver Members + + public GamePadState GetState(int index) + { + return new GamePadState(); + } + + public GamePadCapabilities GetCapabilities(int index) + { + return new GamePadCapabilities(); + } + + public string GetName(int index) + { + throw new NotImplementedException(); + } + + #endregion + #region NativeMethods class NativeMethods