Spherical forums

General Discussion => Off-Topic Discussions => Topic started by: Flying Jester on May 01, 2016, 05:29:20 pm

Title: I wrote a joystick tester
Post by: Flying Jester on May 01, 2016, 05:29:20 pm
I wrote this a while ago, but I had reason to use it again recently.

https://github.com/FlyingJester/joystick_test (https://github.com/FlyingJester/joystick_test)

It's a joystick tester, and it's mostly useful when you want to know what number a certain button on a joystick is, or what the name and number of the joystick itself is. It's also fairly useful for calibrating the joystick if you want to know where deadzones are.

I remember that Windows 2000 had something very much like this, but only for gameport joysticks. I assume it was killed off because the gameport was (sadly) deprecated, but I've never really come across a nice replacement for it. So I wrote my own, while working on a beat-em-up that used SDL2. I figured I'd share it, in case someone else needed it.

It depends on SDL2 and fltk, although the fltk part is optional, in which case it runs on the command line only.
Title: Re: I wrote a joystick tester
Post by: Fat Cerberus on May 01, 2016, 05:43:52 pm
I believe Windows XP had something like this buried in Control Panel which also worked for USB joysticks/gamepads (plus a wizard for analog calibration).  I don't remember if it was in Vista and later though, so this is nifty.  When I get around to replacing my gamepad (the wire of my old one developed a short), I'll be sure to try this out.
Title: Re: I wrote a joystick tester
Post by: mezzoEmrys on May 19, 2016, 02:07:05 am
I believe I've encountered it here on Windows 7, made it quick and easy to calibrate and figure out buttons on my usb gamecube and n64 controllers.

Yup, Control Panel > Devices and Printers > Right click on a game controller > Game Controller Settings
Use properties to view the inputs, do calibration, etc.

I'll have to check if it's in Win10 tomorrow.
Title: Re: I wrote a joystick tester
Post by: DaVince on May 19, 2016, 01:43:14 pm
Quote
Yup, Control Panel > Devices and Printers > Right click on a game controller > Game Controller Settings

Open start menu, type "controller", press enter.

Really, the search box is the most useful thing MS ever added to the start menu/launchers. :P
Title: Re: I wrote a joystick tester
Post by: Flying Jester on May 19, 2016, 01:49:48 pm
Well, phooey! I never found it in Vista on up.

I mostly used this on OS X and Linux (and now FreeBSD), and there are still no system-included equivalents there :P
Title: Re: I wrote a joystick tester
Post by: Fat Cerberus on May 19, 2016, 02:01:43 pm

I mostly used this on OS X and Linux (and now FreeBSD), and there are still no system-included equivalents there :P


Really?  I can see Linux and FreeBSD not having it, but you'd think OS X would. :o
Title: Re: I wrote a joystick tester
Post by: Flying Jester on May 19, 2016, 02:11:04 pm
OS X ain't what it used to be.

Perhaps Gnome or KDE has one, but I don't use either of those. And if they do, you certainly couldn't install it and all of its dependencies in a few megabytes.
Title: Re: I wrote a joystick tester
Post by: DaVince on May 19, 2016, 02:14:35 pm

Well, phooey! I never found it in Vista on up.

I mostly used this on OS X and Linux (and now FreeBSD), and there are still no system-included equivalents there :P

jstest-gtk is pretty decent! It lets you set up multiple configurations. It doesn't require much in the way of dependencies either.