Commit graph

11215 commits

Author SHA1 Message Date
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
Ethan Lee
54ce812205 SDL_exp 2018-08-04 11:52:46 -04:00
Ryan C. Gordon
b41191fbf2 cmake: use WINDOWS instead of WIN32.
--HG--
extra : histedit_source : be7d5850d1e2d3ca834da337a4ac88dca63c0547
2018-08-02 16:21:43 -04:00
Ryan C. Gordon
45974c3953 Some drag'and'drop improvements.
First: disable d'n'd events by default; most apps don't need these at all, and
if an app doesn't explicitly handle these, each drop on the window will cause
a memory leak if the events are enabled. This follows the guidelines we have
for SDL_TEXTINPUT events already.

Second: when events are enabled or disabled, signal the video layer, as it
might be able to inform the OS, causing UI changes or optimizations (for
example, dropping a file icon on a Cocoa app that isn't accepting drops will
cause macOS to show a rejection animation instead of the drop operation just
vanishing into the ether, X11 might show a different cursor when dragging
onto an accepting window, etc).

Third: fill in the drop event details in the test library and enable the
events in testwm.c for making sure this all works as expected.

--HG--
extra : rebase_source : a8d5c21e97b34dbd6ce88237863c084d8825350a
extra : amend_source : 81c4acd9f5ca8dc5a4642b250ca6b42fd79cac87
2018-08-02 16:03:47 -04:00
Ryan C. Gordon
cb84e488f5 Backed out changeset dfebed374d73.
This change isn't correct. See comments in Bugzilla #4183.

--HG--
extra : rebase_source : a083f2f9dbda7cebffc8629e29c7205133d35c21
2018-07-22 19:42:08 -04:00
Ryan C. Gordon
d1d7e776ed libm: Fixed signature mismatches for __ieee754_rem_pio2 and __kernel_rem_pio2.
Fixes Bugzilla #4201.

--HG--
extra : rebase_source : 66bdbdda3e4821bd87fcecf9d4f10f0a522f5a2e
2018-07-22 19:40:42 -04:00
Ryan C. Gordon
50654a3801 windows: Fixed some Visual Studio warnings about shadowed variables.
Fixes Bugzilla #4118.

--HG--
extra : rebase_source : c724a73700dbbd51aae4ba885e3465cf3e5daf30
2018-07-22 19:28:27 -04:00
Vitaly Novichkov
2b79c7662d Remove "lib" prefix from DLL file on MinGW builds
closes bug #4209.
2018-06-29 18:29:17 +03:00
Marc Di Luzio
750ab3ed08 Ensure we still clear the X locale modifiers even if not compiled with ibus or fcitx support 2018-07-12 16:52:45 +01:00
Ryan C. Gordon
31b032bcc3 dbus: Deal with undefined behavior with va_args.
Parse out a copy of the varargs ourselves to get to the reply portion, since
the original passed to D-Bus might modify or not modify the caller's copy,
depending on system ABI.
2018-07-13 17:53:24 -04:00
Sam Lantinga
abfd37842e Clean up captured pointer code to avoid logcat clutter on pre-8.0 systems (thanks Rachel!) 2018-07-13 12:55:50 -07:00
Sam Lantinga
a9bf4b69ea More controller drivers support CARTESIAN coordinates.
This fixes rumble on the Saitek Cyborg V.3 Rumble Pad
2018-07-12 13:28:15 -07:00
Sam Lantinga
bbc117137c Allow trapping the back button so right mouse click can work on some Android systems (thanks Rachel!)
Also, added a function SDL_AndroidBackButton() so applications can respond to the back button directly
2018-07-12 13:28:13 -07:00
Ozkan Sezer
b8c51e817d ltmain.sh: make OSX autofoo builds' compatibility version match Xcode builds.
closes bug #4208.
2018-07-05 23:01:10 +03:00
Wohlstand
0b7134ff2c Fixed bug 4210 - SSE2-based converter makes junk result of S32 -> Float
At the HG state e604fe493d45, 64-bit assemblies are using SSE2-based resampler, produces junk sound when converting the S32 -> Float32 -> S16 chain. The `NEED_SCALAR_CONVERTER_FALLBACKS` thing works perfectly.

If I will find a reason that caused this mistake, I'll send a patch by myself.
2018-07-02 03:53:57 +03:00
Ozkan Sezer
89a9a997ec made the wasapi configury option consistent with others. 2018-07-01 19:50:00 +03:00
Ozkan Sezer
45850bad77 make WASAPI configurable in autofoo and cmake (default is on.)
closes bug #3798.
2018-07-01 17:01:04 +03:00
Ozkan Sezer
d88abddcbc SDL_windowstaskdialog.h (struct _TASKDIALOGCONFIG): make unions anonymous
otherwise build fails. (at least with my VS2005. and the code accesses the
arms of the unions anonymously anyway.)
2018-06-30 20:55:51 +03:00
Ozkan Sezer
e5213cf7df correct the comment correction.. 2018-06-30 20:10:40 +03:00
Ozkan Sezer
fca418b01b comment correction 2018-06-30 20:04:01 +03:00
Ozkan Sezer
09860178dc ran 'chmod -x' on two files 2018-06-30 20:03:23 +03:00