LWJGL Forum

Programming => Lightweight Java Gaming Library => Topic started by: irrisor on November 16, 2006, 19:43:44

Title: JInputController.getName() garbles joystick name
Post by: irrisor on November 16, 2006, 19:43:44
Hi guys,

JInputController.getName() does this:

String name = target.getName();
return name.substring(0,name.length()/2);


Why?!? name is fine after the first line (not dublicated or something) - the second line cuts it in half :(

Is this only for me or should this be changed?
Title: JInputController.getName() garbles joystick name
Post by: kevglass on November 17, 2006, 07:20:10
I've updated this. The cutting in half I believe was residual from the old version of JInput which seemed to duplicate names in the name reported.

Either way, whatever JInput is returning should be what we report.

Kev
Title: JInputController.getName() garbles joystick name
Post by: irrisor on November 17, 2006, 09:08:16
fine :)