Sam Lantinga
883aa6e737
Fixed warnings building on Mac OS X 64-bit
2018-08-20 21:19:17 -07:00
Sam Lantinga
4e8e3ba35c
Fixed code style
2018-08-20 21:18:56 -07:00
Ryan Speets
34b4282e0f
Emscripten: Fixed SDL_SYSTEM_CURSOR_SIZEALL
2018-08-18 12:30:04 +01:00
Ozkan Sezer
71027120f3
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
177487e507
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
6e0f2d6619
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
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
1ac1a37f85
Added Windows Xbox controller state packet handling, for completeness.
2018-08-15 19:53:36 -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
Ryan C. Gordon
5733323e40
libm: one more static analysis fix.
2018-08-10 15:22:02 -04:00
Ryan C. Gordon
20e362b11e
haiku: Patched to compile with new joystick interfaces.
2018-08-10 15:04:08 -04:00
Ryan C. Gordon
9440c9abd6
bsd: Patched to compile.
...
(I think.)
2018-08-10 14:54:26 -04:00
Ryan C. Gordon
cf7dd1d52c
bsd: Update joystick code for new interfaces.
...
(this is an untested push to see if buildbot likes it.)
2018-08-10 14:42:40 -04:00
Ryan C. Gordon
0cd3f11834
emscripten: Patched to compile with new joystick interfaces.
2018-08-10 14:32:30 -04:00
Ryan C. Gordon
fe06d7d968
joystick: define inline to SDL_INLINE
2018-08-10 14:10:47 -04:00
Ryan C. Gordon
b44008f1ac
joystick: #if 0'd out some things that aren't currently used.
...
Fixes some compiler warnings.
2018-08-10 14:09:44 -04:00
Ozkan Sezer
6432de4a4b
SDL_hidapi_ps4.c: lowercase windows header names.
2018-08-10 11:50:55 +03:00
Ozkan Sezer
e412b58e6b
chmod -x Android.mk
2018-08-10 11:50:01 +03:00
Sam Lantinga
45352c8e76
Re-enabled the HIDAPI joystick driver on Windows and Mac OS X
2018-08-09 22:53:43 -07:00
Sam Lantinga
d99ccf6754
Added missing files from previous commits
2018-08-09 16:05:48 -07:00
Sam Lantinga
414d526420
Added notes that this code was contributed by Valve
2018-08-09 16:04:45 -07:00
Sam Lantinga
fa59af0af0
There's no controller that's supported by both XInput and HIDAPI
2018-08-09 16:04:34 -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
a33cd77b54
The MINIX NEO-U1 is now being reported as Android TV
2018-08-09 16:04:25 -07:00
Sam Lantinga
da3990ef7d
Sam Lantinga <slouken@libsdl.org> 2018-08-06 13:00 -0700
...
Backed out changeset 448e9f627e71
http://hg.libsdl.org/SDL/rev/e1f4191461a0
2018-08-09 16:04:21 -07:00
Sam Lantinga
a1be1fdcfb
Sam Lantinga <slouken@libsdl.org> 2018-08-06 11:58 -0700
...
Removed mapping for VID/PID 0x0079/0x0006, which is a generic PCB used in many different devices
http://hg.libsdl.org/SDL/rev/448e9f627e71
2018-08-09 16:04:18 -07:00
Sam Lantinga
2b7a44c3e2
SDL: disable HIDAPI in SDL on Windows/Mac.
2018-08-09 16:03:55 -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
90f9ce1e41
Fixed Windows build
2018-08-09 16:03:29 -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
Ryan C. Gordon
13edfebf3b
libm: Don't let Visual Studio generate an implicit memset() call.
2018-08-08 15:39:20 -04:00
Ryan C. Gordon
fd89008004
backout INFINITY change...of course Visual Studio doesn't have it.
2018-08-08 12:36:54 -04:00
Ryan C. Gordon
87c0669163
e_exp: One more compiler warning.
2018-08-08 12:19:01 -04:00
Ryan C. Gordon
a6ccb4f336
libm: Fixed all static analysis warnings.
2018-08-08 12:13:56 -04:00
Ryan C. Gordon
0e7971862f
e_exp: Fixed compiler warning on Visual Studio.
2018-08-08 10:26:22 -04:00
Ryan C. Gordon
28f6d22f39
haiku: Rename internal functions from BE_* to HAIKU_*
...
Fixes Bugzilla #2349 .
2018-08-07 18:07:11 -04:00
Ryan C. Gordon
f04deb0b0e
configure: Make wayland sources depend on generated headers.
...
Otherwise occasionally the sources will try to compile before the headers it
needs are generated.
Fixes Bugzilla #3977 .
2018-08-07 17:28:07 -04:00
Ryan C. Gordon
ab610a7584
evdev: On sudden termination, make sure keyboard isn't lost (thanks, Tadek!)
...
"In release 2.0.6, when Linux evdev keyboard support has been moved to a
separate source file, a feature was added to disable normal keyboard event
processing to prevent "spilling" keystrokes to background virtual console.
This feature has one unpleasant side effect: if application fails to call
`SDL_Exit` before termination or crashes with fatal signal, console is left
in unusable state with keyboard not working and no possibility to switch
virtual console. If user has a chance, he can login remotely and restore
keyboard with `kbd_mode`, otherwise the only option is to reboot the machine.
This patch fixes that problem by intercepting fatal signals (with `sigaction`)
and process termination (with `atexit`), to restore keyboard state, if it
wasn't properly restored with `SDL_Exit`.
The function registered with `atexit` also restores original signal handlers,
to prevent leaving invalid handlers after SDL library is unloaded, if it was
loaded dynamically with `dlopen`.
No signal handlers or `atexit` function are installed if SDL boolean hint
`SDL_HINT_NO_SIGNAL_HANDLERS` is `SDL_TRUE`.
Additionally, if environment variable `SDL_INPUT_LINUX_KEEP_KBD` exists,
keyboard initialization function completely skips disabling keyboard. This
can be useful for debugging."
Fixes Bugzilla #4193 .
2018-08-07 16:56:46 -04:00
Ryan C. Gordon
c041a8ab67
alsa: optionally run entire pipeline non-blocking.
2018-08-07 16:49:18 -04:00
Ryan C. Gordon
8b5143fc7d
audio: Deal with device shutdown more carefully.
...
This would cause problems in various ways, but specifically triggers an
assert when you close a WASAPI capture device in an app running over RDP.
Related to (but not the actual bug) in Bugzilla #3924 .
2018-08-07 13:04:15 -04:00
Mai Lavelle
b193f2c097
haptic: Fix initial detection of haptic devices on Linux system
...
SDL_UDEV_Scan must be called during SDL_SYS_HapticInit to ensure devices
outside of the 0-31 range are added to the list of haptic devices.
Fixes Bugzilla #3923 .
--HG--
extra : histedit_source : 3244924c52322015bb86e5aa1168270ac457f7f7
2018-08-07 12:06:31 -04:00
Sam Lantinga
ab526d283f
Backed out changeset 448e9f627e71
...
It turns out the mapping is correct, just the name was confusing
2018-08-06 13:00:11 -07:00
Sam Lantinga
0d0879fbfc
Removed mapping for VID/PID 0x0079/0x0006, which is a generic PCB used in many different devices
...
Different device with same vid/pic that is kind of a Saitek shape:
https://www.trust.com/en/product/17416-gxt-24-runa-compact-gamepad
n64 with same ID
https://bbs.archlinux.org/viewtopic.php?id=163488
PS shaped with numbers for buttons
https://pineight.com/mw/index.php?title=USB_game_controller#DragonRise_Inc._Generic_USB_Joystick
fightstick with same vid/pid
https://retropie.org.uk/forum/topic/7594/bartop-2-player-zero-delay-encoders-not-working
2018-08-06 11:58:08 -07:00
Ozkan Sezer
bda34ed63c
SDL_expf: return SDL_exp() instead of SDL_uclibc_exp() for consistency.
2018-08-05 10:01:01 +03:00