test/controllermap.c


Log

Author Commit Date CI Message
Philipp Wiesemann 20c846eb 2017-03-04T23:05:47 Fixed warning about implicit conversion in controllermap program.
Sam Lantinga a395a907 2017-01-20T16:40:11 Fixed mapping the PG-9021 which, on Linux, emits a button partway through the trigger press along with axis motion all along the pull
Sam Lantinga 4938c505 2017-01-04T10:28:07 Added SDL_JoystickGetAxisInitialState() to get a joystick axis' initial value. This is useful for controller mapping programs to determine an axis' zero state
Sam Lantinga 1ddff75c 2017-01-04T05:09:02 Some controllers have trouble getting out to 20000
Sam Lantinga 082132a7 2017-01-03T23:39:28 Fixed binding the D-pad on some Super NES style controllers Fixed a case where partial trigger pull could be bound to another button There is a fundamental problem not resolved by this commit: Some controllers have axes (triggers, pedals, etc.) that don't start at zero, but we're guaranteed that if we get a value that it's correct. For these controllers, the current code works, where we take the first value we get and use that as the zero point and generate axis motion starting from that point on. Other controllers have digital axes (D-pad) that assume a zero starting point, and the first value we get is the min or max axis value when the D-pad is moved. For these controllers, the current code thinks that the zero point is the axis value after the D-pad motion and this doesn't work. My hypothesis is that the first class of devices is more common and that we should solve for that, and add an exception to SDL_JoystickAxesCenteredAtZero() as needed for the second class of devices.
Sam Lantinga 45b774e3 2017-01-01T18:33:28 Updated copyright for 2017
Philipp Wiesemann de79828b 2016-12-28T20:11:12 Fixed warning about unused variable in controllermap program.
Sam Lantinga 21cb42d7 2016-12-27T09:51:58 Make sure we go all the way back (within the XBox controller dead zone) to prevent accidentally binding axes inverted
Sam Lantinga 6d7da088 2016-12-27T01:39:07 Split controller axes into positive and negative sides so each can be bound independently. Using this a D-Pad can be mapped to a thumbstick and vice versa. Also added support for inverted axes, improving trigger binding support
Philipp Wiesemann 0a3f9d0c 2016-12-16T22:58:16 Fixed warning about unused variable in controllermap program.
Sam Lantinga 0c5e7a10 2016-12-15T14:27:22 Fixed handling joysticks that send multiple events for a single control, e.g. both a button and axis event for a trigger. Tested with the 8Bitdo NES30 Pro on Linux
Sam Lantinga c406f649 2016-11-10T18:53:50 Added USB VID/PID information to the SDL test programs
Philipp Wiesemann 826508b6 2016-10-15T20:01:30 Removed unused constants in controllermap program.
Sam Lantinga cb7b823c 2016-10-13T02:09:37 Fixed black screen on Steam Link
Philipp Wiesemann 929b965c 2016-09-21T23:06:38 Fixed compiling of three test programs with C++.
Sam Lantinga 42065e78 2016-01-02T10:10:34 Updated copyright to 2016
Sam Lantinga 7b680a2a 2015-12-18T18:49:23 Fixed mapping third party XBox controllers that have the trigger axis all the way in until they are pulled and get updated values.
Philipp Wiesemann 11d98995 2015-11-25T21:39:28 Replaced tabs with spaces in test programs.
Philipp Wiesemann 0e45984f 2015-06-21T17:33:46 Fixed crash if initialization of EGL failed but was tried again later. The internal function SDL_EGL_LoadLibrary() did not delete and remove a mostly uninitialized data structure if loading the library first failed. A later try to use EGL then skipped initialization and assumed it was previously successful because the data structure now already existed. This led to at least one crash in the internal function SDL_EGL_ChooseConfig() because a NULL pointer was dereferenced to make a call to eglBindAPI().
Sam Lantinga 2c4a6ea0 2015-05-26T06:27:46 Updated the copyright year to 2015
Ryan C. Gordon b72938c8 2015-04-20T12:22:44 Windows: Always set the system timer resolution to 1ms by default. An existing hint lets apps that don't need the timer resolution changed avoid this, to save battery, etc, but this fixes several problems in timing, audio callbacks not firing fast enough, etc. Fixes Bugzilla #2944.
Alex Szpakowski fe6c797c 2015-04-10T23:30:31 Fixed an iOS view orientation issue when SDL_GL_CreateContext or SDL_CreateRenderer is called.
Edward Rudd b88ca1b4 2015-02-10T16:28:56 the last parameter of XChangeProperty is the number of elements.. and when the element format is 32.. the element is "long" so we have 5 long elements here. Yes this seems confusing as on mac+linux Long is either 32 or 64bits depending on the architecture, but this is how the X11 protocol is defined. Thus 5 is the correct value for the nelts here. Not 5 or 10 depending on the architecture. More info on the confusion https://bugs.freedesktop.org/show_bug.cgi?id=16802
Philipp Wiesemann b48e54aa 2015-01-26T22:00:29 Fixed bug 2802 - [patch] Fix android build compiling in wrong filesystem implementation Jonas Kulla The configure script didn't differentiate between Linux and Android, unconditionally compiling in the unix implementation of SDL_sysfilesystem.c. I'm probably one of the very few people building SDL for android using classic configure + standalone toolchain, so this has gone undetected all along.
Philipp Wiesemann d9991154 2014-12-10T21:13:43 Fixed setting text to clipboard in controllermap program.
David Ludwig 70438be2 2014-12-03T10:55:23 WinRT: fixed bug whereby SDL would override an app's default orientation WinRT apps can set a default, preferred orientation via a .appxmanifest file. SDL was overriding this on app startup, and making the app use all possible orientations (landscape and portrait). Thanks to Eric Wing for the heads up on this!
Philipp Wiesemann 9c398852 2014-11-22T22:20:40 Corrected header file documentation comment.
Pierre-Loup A. Griffais 24c86b55 2014-09-11T19:24:42 [X11] Reconcile logical keyboard state with physical state on FocusIn since the window system doesn't do it for us like other platforms. This prevents sticky keys and missed keys when going in and out of focus, for example Alt would appear to stick if switching away from an SDL app with Alt-Tab and had to be pressed again. CR: Sam
Philipp Wiesemann 3a803358 2014-05-29T22:44:08 Fixed use of uninitialized variable warning in test program.
Gabriel Jacobo f565d81a 2014-05-10T15:57:09 A few more ANDROID for __ANDROID__ replacements
David Ludwig 3dcb451f 2014-04-09T21:29:19 Added a README file regarding WinRT support To note, this file is currently formatted with CRLF line endings, rather than LF, to allow the file to be viewed with Notepad.
Gabriel Jacobo 22a7dd0b 2014-03-24T11:42:09 Fixes #2456, controllermap's undo does not work correctly (by Bogdan Marinov)
Ryan C. Gordon 1f45d4b6 2014-03-18T12:33:57 controllermap: Don't treat SDL_HAT_CENTERED as a valid input.
Ryan C. Gordon 2d92a372 2014-02-10T11:29:48 Make controllermap, etc, work on platforms with hardcoded window sizes. This makes sure everything renders correctly, even if, say, an Android device gives you a certain "window" size no matter what you ask for.
Gabriel Jacobo 9268c7a1 2014-02-10T09:26:22 Backed out 0869362ccc3c The render target usage in controllermap is required if you are forced to use the app at a different resolution than the one the art has been made for, for example on Android, where you don't control the resolution. (The coordinates for each button are hardcoded to the art size, and appear out of place otherwise)
Ryan C. Gordon f0aa97d2 2014-02-10T01:43:01 Removed unused function.
Ryan C. Gordon 9a15da84 2014-02-09T15:20:41 No need to use a render target here.
Sam Lantinga 58edac3e 2014-02-02T00:53:27 Fixed bug 2374 - Update copyright for 2014... Is it that time already??
Philipp Wiesemann 65f0142f 2013-12-25T00:11:28 Fixed access of command line arguments on Android in two test programs.
Philipp Wiesemann 36cbd506 2013-12-25T00:04:31 Fixed unused local variable warning in test program source.
Gabriel Jacobo 77d2d55e 2013-12-05T10:51:38 [Android] Handle native thread finishing when not commanded from the Java side
Gabriel Jacobo 5ac18134 2013-12-03T12:01:28 Adds SDL_GameControllerAddMappingsFromRW, updates controllermap SDL_GameControllerAddMappingsFromFile is now a convenience macro. controllermap can now skip bindings by pressing space or clicking/touching the screen.
Gabriel Jacobo 95ec90aa 2013-12-02T19:35:04 Adds controllermap utility to test suite.