From dc1ffab78dbd7a0a23a1aecaf04f1e504c565c92 Mon Sep 17 00:00:00 2001 From: thefiddler Date: Thu, 2 Jan 2014 01:34:21 +0100 Subject: [PATCH] [Input] Implemented IGamePadDriver.GetName() --- Source/OpenTK/Platform/MappedGamePadDriver.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Source/OpenTK/Platform/MappedGamePadDriver.cs b/Source/OpenTK/Platform/MappedGamePadDriver.cs index dbac6149..8240d74c 100644 --- a/Source/OpenTK/Platform/MappedGamePadDriver.cs +++ b/Source/OpenTK/Platform/MappedGamePadDriver.cs @@ -91,7 +91,14 @@ namespace OpenTK.Platform public string GetName(int index) { - throw new NotImplementedException(); + JoystickCapabilities joy = Joystick.GetCapabilities(index); + string name = String.Empty; + if (joy.IsConnected) + { + GamePadMap map = GetConfiguration(Joystick.GetGuid(index)); + name = map.Name; + } + return name; } #region Private Members