Sam Lantinga
678ba78382
Generalized the XInput user index into a player index
2018-10-25 16:53:14 -07:00
Sam Lantinga
ab13676713
Make sure we don't read and write to HIDAPI at the same time, it's not thread-safe on Windows
2018-10-02 20:51:33 -07:00
Ozkan Sezer
acf03aea49
safer this way, just in case..
2018-09-25 09:20:56 +03:00
Sam Lantinga
e5786b21c3
Fixed bug 4267 - linkage failure with --enable-hidapi because of missing libudev symbols
...
Ozkan Sezer
hidapi dynamic udev initial patch
2018-09-24 16:33:14 -07:00
Sam Lantinga
81d9677756
Fixed crash launching under Steam on Mac OS X
2018-09-14 12:41:29 -07:00
Ozkan Sezer
efaed040cb
hidapi/SDL_hidapijoystick.c: fix build in C90 mode:
...
src/joystick/hidapi/SDL_hidapijoystick.c: In function 'HIDAPI_InitializeDiscovery':
src/joystick/hidapi/SDL_hidapijoystick.c:281: error: 'true' undeclared (first use in this function)
src/joystick/hidapi/SDL_hidapijoystick.c:281: error: (Each undeclared identifier is reported only once
src/joystick/hidapi/SDL_hidapijoystick.c:281: error: for each function it appears in.)
src/joystick/hidapi/SDL_hidapijoystick.c: In function 'HIDAPI_UpdateDiscovery':
src/joystick/hidapi/SDL_hidapijoystick.c:339: error: 'true' undeclared (first use in this function)
src/joystick/hidapi/SDL_hidapijoystick.c:341: error: ISO C90 forbids mixed declarations and code
2018-09-07 11:03:24 +03:00
Sam Lantinga
cd08cc2a4e
Better fix to make sure we're only returning controllers from the HIDAPI joystick API
2018-08-31 18:10:21 -07:00
Sam Lantinga
d4ebcc0148
Fixed whitespace
2018-08-29 20:23:36 -07:00
Sam Lantinga
8235f84320
Use a unified name list for Xbox 360 and Xbox One controllers for drivers that can handle both
2018-08-15 23:14:43 -07:00
Sam Lantinga
4d30496429
Fixed input from the Steam Virtual Gamepad on Mac OS X
2018-08-15 19:53:34 -07:00
Sam Lantinga
ea70c5b7a4
Use SDL specific window class to avoid conflicting with Steam
2018-08-15 19:53:31 -07:00
Sam Lantinga
5cffb66660
Catch device removal as well as device arrival on Windows
2018-08-15 19:53:30 -07:00
Sam Lantinga
242d67f07b
Turned off debug messages
2018-08-15 19:53:28 -07:00
Sam Lantinga
ae47f3aa91
Remove the HIDAPI device if we get a read error from it
...
This fixes detecting PS4 controller disconnect on Mac OS X, where there isn't any device removed notification
2018-08-15 19:53:26 -07:00
Sam Lantinga
a7e38096ba
Fixed Mac OS X build
2018-08-15 19:53:24 -07:00
Sam Lantinga
b29504064b
Polling hid_enumerate() every 3 seconds causes freezes and stutters on some USB audio devices and mice.
...
We'll only enumerate devices when we get notification that the system devices have changed
2018-08-15 19:53:22 -07:00
Sam Lantinga
1e8a089ec1
Don't update the device list for devices we know aren't supported
...
This should reduce HID enumeration (hitting the USB bus) if for some reason we're getting spammed with false device insert/removal events
2018-08-09 16:04:30 -07:00
Sam Lantinga
29023f51e8
Worked around bug with Sony PS Now PS3 controller where DirectInput polling will continue to return success after the controller is unplugged.
...
The code is now reliant on SDL_PrivateJoystickAdded() and SDL_PrivateJoystickRemoved() being called correctly when devices are added or removed on Windows
2018-08-09 16:03:50 -07:00
Sam Lantinga
db39b4811f
Added HIDAPI joystick drivers for more consistent support for Xbox, PS4 and Nintendo Switch Pro controller support across platforms.
...
Added SDL_GameControllerRumble() and SDL_JoystickRumble() for simple force feedback outside of the SDL haptics API
2018-08-09 16:00:17 -07:00