0

All I see is a string property called Description which simply returns a generated string of the hardware index, and axis/button count. "Joystick/Joystick #0 (7 axes, 10 buttons)" is usable, but not very informative.

Other SDL-based libraries show the actual name of the device. Is this possible in OpenTK? If not, is it going to be added soon?

Blake O'Hare
  • 1,863
  • 12
  • 16
  • Feel free to raise a feature request at https://github.com/opentk/opentk/issues – Ibasa Nov 01 '15 at 09:34
  • Done! https://github.com/opentk/opentk/issues/312 – Blake O'Hare Nov 07 '15 at 19:18
  • Actually there is an implementation to access SDL_JoystickName in OpenTK.Platform.SDL2. But unfortunately you can not call it due to its protection level. –  Dec 14 '15 at 12:52
  • @nmin: Do you have a pointer to where in the source? I wasn't able to find anything in the github. Since this is for generated code buried deep within a framework, I'd be more than happy to use my reflection shovel to get access to it. – Blake O'Hare Dec 17 '15 at 02:10
  • @Blake O: You should be able to find it there: opentk/Source/OpenTK/Platform/SDL2/Sdl2.cs and then "JoystickName". This expects an IntPtr wich might be the one returned by "JoystickOpen". –  Dec 17 '15 at 22:29

0 Answers0