Commit Graph

225 Commits

Author SHA1 Message Date
Ozkan Sezer
33381d3d10 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
80021c21b6 Speculatively disable rumble on the Razer Panthera Evo, which doesn't have rumble motors and probably hangs in the same way the Panthera does. 2018-09-05 15:28:06 -07:00
Sam Lantinga
c152e380be Added support for the Razer Panthera Fightstick
Fixed bindings for the Mad Catz FightStick TE S+
2018-09-05 11:18:50 -07:00
Sam Lantinga
34237b80f4 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
5ef8eb49be Don't show the Razer Raiju sound interface as a game controller 2018-08-29 20:55:02 -07:00
Sam Lantinga
207428b444 Don't rumble Bluetooth PS4 controllers by default, as that switches the controller into extended input report mode, which breaks games that use DirectInput. 2018-08-29 20:23:39 -07:00
Sam Lantinga
16ccff3c56 Fixed whitespace 2018-08-29 20:23:36 -07:00
Sam Lantinga
fda14741ac Fixed Xbox One S Bluetooth support on Mac OS X 2018-08-29 18:56:54 -07:00
Ozkan Sezer
90454b1ece SDL_hidapi_ps4.c: define NTDDI_VISTA / _WIN32_WINNT_VISTA if not defined
it still needs a Vista or newer Platform SDK to build, though.
2018-08-16 11:01:02 +03:00
Sam Lantinga
7d3a7ef827 Use a single hint for both Xbox 360 and Xbox One controllers, since they are often the same driver. 2018-08-15 23:35:54 -07:00
Sam Lantinga
a2add1f683 Use the HIDAPI driver for Xbox controllers on Windows, and determine the XInput mapping at runtime for extended functionality like rumble and guide button. 2018-08-15 23:14:45 -07:00
Sam Lantinga
3f5ff751fe 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
aad340eb86 Added Windows Xbox controller state packet handling, for completeness. 2018-08-15 19:53:36 -07:00
Sam Lantinga
63107524f6 Fixed input from the Steam Virtual Gamepad on Mac OS X 2018-08-15 19:53:34 -07:00
Sam Lantinga
0903e83553 Use SDL specific window class to avoid conflicting with Steam 2018-08-15 19:53:31 -07:00
Sam Lantinga
c88666580e Catch device removal as well as device arrival on Windows 2018-08-15 19:53:30 -07:00
Sam Lantinga
641c674f2a Turned off debug messages 2018-08-15 19:53:28 -07:00
Sam Lantinga
51902010c6 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
dfbd7f65a9 Fixed Mac OS X build 2018-08-15 19:53:24 -07:00
Sam Lantinga
ec74c318b9 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
Ozkan Sezer
a7c3d2af81 SDL_hidapi_ps4.c: lowercase windows header names. 2018-08-10 11:50:55 +03:00
Sam Lantinga
31b0224397 Added notes that this code was contributed by Valve 2018-08-09 16:04:45 -07:00
Sam Lantinga
ab07ce1166 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
888bf1af69 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
d2042e1ed4 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