src/joystick


Log

Author Commit Date CI Message
Sam Lantinga f79fc33a 2013-08-29T08:29:21 Christoph Mallon: Remove pointless if (x) before SDL_free(x)
Ryan C. Gordon 257cef30 2013-08-28T22:09:17 Change order we enumerate Windows joysticks. Make it so XInput devices are listed before DirectInput devices, and that the XInput devices are sorted by userid in ascending numeric order (so device 0 comes first).
Ryan C. Gordon ea4350d8 2013-08-28T22:07:54 Don't corrupt XInput device state during SDL_SYS_JoystickClose().
Ryan C. Gordon aa652114 2013-08-28T17:17:21 Make XInput joystick names match the numbers on the device. (And how the Haptic code already names them.)
Ryan C. Gordon 4b255c63 2013-08-28T16:43:47 Reworked XInput and DirectInput joystick code. Now multiple XInput controllers map correctly to device indexes instead of grabbing the first available userid, and are completely separated out from DirectInput. Also, the hardcoded limitation on number of DirectInput devices is gone. I don't expect there to really ever be more than eight joysticks plugged into a machine, but it was a leftover limitation for a static array we didn't actually use anymore. Fixes Bugzilla #1984. (etc?)
Ryan C. Gordon c89e0469 2013-08-28T16:35:32 Better XInput detection code for DirectInput device enumeration. This code is way faster than the Wbem code, and less ugly.
Sam Lantinga cd27a1ef 2013-08-21T12:12:04 Fixed compiling on old versions of the DirectX SDK
Sam Lantinga 9faefccd 2013-08-21T10:32:04 SDL - detect that you tried to open a gamecontroller in xinput mode and failed, then re-get the mapping for the dinput variant you did open (and most likely now just fail the open) CR: SamL
Sam Lantinga 05d8c2dc 2013-08-21T10:31:44 Fix SDL xinput code to work at all when xinput has devices at high indexes but no device connected at lower index, for instance 0->disconnected, 1->wireles, 2->wired. Previously the SDL code assumed the indexes were always used up in order which is not true at all and lead to a bunch of failure cases where controllers would go unrecognized. This entire function is kind of a mess and more complicated than needed, but I don't want to refactor it too heavily tonight. May look at improving how the indexes are assigned more significanly later. The way it handles not finding a valid "gamepad" type device is also super broken, it leaves in place the xinput bindings but opens the controller with dinput and ends up with completely wrong mappings, not solving that now, but fixing the bug where we'd very frequently not find a controller due to gaps in assigned player numbers should mostly avoid it.
Gabriel Jacobo 5f8de2b9 2013-08-21T10:27:39 Patched to compile on Darwin
Gabriel Jacobo 695344d1 2013-08-21T09:43:09 OCD fixes: Adds a space before */
Gabriel Jacobo 552b04c5 2013-08-20T20:34:40 More non C89 compliant comments
Gabriel Jacobo 63fe3a77 2013-08-20T19:49:24 Fixes a few non C89 compliant comments
Gabriel Jacobo dad42067 2013-08-12T11:13:50 Fixes #2022, do not resume on Android when surfaceChanged If the app is in landscape mode and the user presses the power button, a pause is followed immediately by a surfaceChanged event because the lock screen is shown in portrait mode. This triggers a "false" resume. So, we just pause and resume following the onWindowFocusChanged events. Also, wait for SDL_APP_WILLENTERBACKGROUND and SDL_APP_DIDENTERBACKGROUND before blocking the event pump.