We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 1759 - Updates to testjoystick.c
Summary: Updates to testjoystick.c
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: *don't know* (show other bugs)
Version: HG 2.0
Hardware: x86_64 Linux
: P2 minor
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-03-17 14:55 UTC by ny00
Modified: 2013-03-20 01:25 UTC (History)
0 users

See Also:


Attachments
The patch to testjoystick.c (3.36 KB, patch)
2013-03-17 14:55 UTC, ny00
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description ny00 2013-03-17 14:55:56 UTC
Created attachment 1071 [details]
The patch to testjoystick.c

A minor patch is attached, with the following few changes to testjoystick.c:
- Unused constant definitions have been removed.
- Output for all analog axes is drawn, even when there is an odd number of axes. (I have a controller with 5 analog axes.)
- Buttons are now drawn on two rows, so there's room for more. In fact, it has been used for testing a proposed joystick patch for Android, where large button ID numbers have been involved (20 and up). For more details see http://bugzilla.libsdl.org/show_bug.cgi?id=1700.
- A few adaptations have been done for the Android platform, assuming joystick support is ever applied to it. One of them is that the very first joystick (in the enumeration of all joysticks) is opened for testing, if there is any.
- It is now possible to quit from the calibration by pressing on a mouse button, tapping on a touchscreen or pressing/tapping on the "Back" button of an Android device. Technically, a press on a key identified by key code SDLK_AC_BACK results in that.
Comment 1 Sam Lantinga 2013-03-20 01:25:58 UTC
Great patch, thanks!
http://hg.libsdl.org/SDL/rev/7c2eb015a6d7