[Input] Implemented IGamePadDriver.GetName()

This commit is contained in:
thefiddler 2014-01-02 01:34:21 +01:00
parent c2c76f2ab2
commit dc1ffab78d

View file

@ -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