Commit Graph

905 Commits

Author SHA1 Message Date
Ryan C. Gordon
1d1a0d7f03 atomic: Patched to compile on Android. 2017-04-13 15:28:56 -04:00
Ryan C. Gordon
1c9c7633d9 atomic: favor compiler intrinsics for compare-and-swap over macOS APIs.
The OSAtomicCompareAndSwap* APIs are deprecated as of macOS 10.12.
2017-04-13 13:28:52 -04:00
Ryan C. Gordon
8c00de57f6 atomic: let Clang always use atomic_load_n if available.
(Apple's Clang reports itself as GCC 4.2.1 in preprocessor macros--the final
GNU C compiler Apple shipped--as of the macOS 10.12 SDK.)
2017-04-13 13:22:23 -04:00
Philipp Wiesemann
2bf79c2e0e mir: Fixed typo in error messages. 2017-04-09 23:00:54 +02:00
Philipp Wiesemann
f6eb23a617 linux: Changed two variables to be static. 2017-04-09 23:00:42 +02:00
Sam Lantinga
27023ed2b3 Added support for the Cyborg V.3 Rumble Pad and the Mad Catz FightPad PRO 2017-04-07 03:39:43 -07:00
Sam Lantinga
1eb92f6342 Implemented Linux joystick blacklist
Based on https://raw.githubusercontent.com/denilsonsa/udev-joystick-blacklist/master/generate_rules.py

This fixes a few devices that are not actually joysticks showing up as such in SDL
2017-04-06 06:30:43 -07:00
Drew Bliss
a4dbf56574 Fix divide-by-zero when videodata->ime_candpgsize is zero. We're seeing this happen in Dota in the wild. 2017-04-06 13:27:51 -07:00
Drew Bliss
66555f6115 SDL - attempt to fix https://github.com/ValveSoftware/Dota-2/issues/1199 of mouse not locking in Dota. This fix is proposed by Ryan Gordon (increase timeout in X11_SetWindowGrab from 250ms to 5000ms). I'm going to integrate to source2 and ship it to dota customers. If it works, SamL will upsteam it to SDL. 2017-04-06 13:27:48 -07:00
Sam Lantinga
53f3786bc0 Added support for a number of game controllers, including the Nintendo Switch Pro Controller 2017-04-04 08:43:44 -07:00
Sam Lantinga
5789da67cf Fixed bug 1859 - No SDL_VIDEORESIZE event generated when the window manager sets the window size.
Samuel Hopkins

Just confirming that the patch from Andreas (attachment 1715 [details]) works for me under SDL 2.0.3 with xmonad.

Stas Sergeev

Confirming that the patch in this ticket fixes the full-screen switching for dosemu2 on ubuntu-16.04. Note that I am not using xmonad, so this bug appears to be generic.
2017-04-03 13:32:53 -07:00
Philipp Wiesemann
1517ba7285 PSP: Fixed error messages. 2017-04-02 21:33:54 +02:00
Philipp Wiesemann
f96cdca4e7 Mir: Changed two internal functions to be static. 2017-04-02 21:33:42 +02:00
Ryan C. Gordon
c57fe6d78a Backing out broken change from previous commit. 2017-04-01 00:46:42 -04:00
Ryan C. Gordon
ed7f16e227 Intentionally breaking buildbot to test email server change. 2017-04-01 00:46:15 -04:00
Sam Lantinga
7891e72dca __atomic_load_n() appears to be available in GCC 5 but not GCC 4 2017-03-30 06:52:34 -07:00
Ryan C. Gordon
028716e79f wasapi: deal with default device changes, and more robust failure recovery. 2017-03-30 16:33:47 -04:00
Ryan C. Gordon
c85c57a05d wasapi: Handle lost audio device endpoints.
This gracefully recovers when a device format is changed, and will switch
to the new default device if the current one is unplugged, etc.

This does not handle when a new default device is added; it only notices
if the current default goes away. That will be fixed by implementing the
stubbed-out MMNotificationClient_OnDefaultDeviceChanged() function.
2017-03-29 14:23:39 -04:00
Ryan C. Gordon
f2179944cc Patched to compile on some platforms. 2017-03-29 12:04:17 -04:00
James Legg
1dc9ae5c1e Use GCC's atomic loads in SDL_AtomicGet and SDL_AtomicGetPtr
This fixes errors reported by address sanitizer, and generates simpler
code on x86 architectures.
2017-03-29 15:48:22 +01:00
Philipp Wiesemann
266816b4aa Removed newlines from error messages. 2017-03-26 21:00:19 +02:00
Sam Lantinga
00da0824f5 Updated axis/button mapping for Dualshock 3, for upcoming Sony driver changes 2017-03-23 13:53:09 -07:00
Brandon Schaefer
c35f46d03c mir: Set the max/min w/h vs just setting the window w/h 2017-03-18 13:57:57 -07:00
Sam Lantinga
22161480ee Compile fix for android.
"ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]"

Moving some variable declarations to the top of Android_SetScreenResolution()
2017-03-14 07:22:08 -07:00
Sam Lantinga
6814f5dbc0 ALSA driver improvements:
* alsa hotplug thread is low priority
* give a chance for other threads to catch up when audio playback is not progressing
* use nonblocking for alsa audio capture
  There is a bug with SDL hanging when an audio capture USB device is removed, because poll never returns
2017-03-14 07:20:14 -07:00
Sam Lantinga
c4d54504fa differentiate between capture / playback audio thread names 2017-03-14 07:16:56 -07:00
Sam Lantinga
763e138903 Added an API to get the joystick instance ID before opening the device: SDL_JoystickGetDeviceInstanceID() 2017-03-09 16:09:16 -08:00
Sam Lantinga
c1802ef646 Fixed compile error with gcc -std=c99 2017-03-06 21:25:06 -08:00
Philipp Wiesemann
72fdf62980 Mir: Fixed crash if creating default cursor failed.
Found by Cppcheck.
2017-03-04 23:05:32 +01:00
Philipp Wiesemann
42d02890f4 Linux: Fixed error message. 2017-03-04 23:05:11 +01:00
Ryan C. Gordon
6aa17426a6 video: Don't compile isAtLeastGL3() if we don't have OpenGL support _at all_. 2017-03-03 16:38:45 -05:00
Ryan C. Gordon
ca0bf151d5 Fix some more compiler warnings on armcc. 2017-03-03 16:38:17 -05:00
Ryan C. Gordon
d526b8a1e9 Some patches to make SDL compile with armcc (ARM's C compiler). 2017-03-02 13:33:04 -05:00
Brandon Schaefer
94a69443c7 mistake: Revert the files that I did not mean to commit 2017-03-01 15:05:54 -08:00
Brandon Schaefer
7bbb13ea59 * Some refactoring and bug fixes. Thanks Micha? Kuchta! 2017-03-01 14:50:59 -08:00
Ryan C. Gordon
bc8778854e raspberrypi: RPI_Destroy() should free the SDL_VideoDevice and its driverdata. 2017-02-28 19:48:52 -05:00
Brandon Schaefer
5a47ee0365 mir: Get ready for Mir 1.0, clean up deprecations. Thanks Micha? Kuchta! 2017-02-27 12:20:16 -08:00
Philipp Wiesemann
e5d9b25d8c Fixed comment style. 2017-02-26 21:20:39 +01:00
Ryan C. Gordon
a4249b48ee Patched to compile on C89 compilers. 2017-02-26 00:56:13 -05:00
Ryan C. Gordon
3b9e4d0a6c audio: Try to keep callbacks firing at normal pace when device is lost. 2017-02-26 00:39:22 -05:00
Ryan C. Gordon
07519a6b95 Removed a bunch of unnecessary #ifdefs. 2017-02-26 00:40:04 -05:00
Ryan C. Gordon
a366c35f37 audio: run the audio callback even if device was lost.
We will throw away the data anyhow, but some apps depend on the callback
firing to make progress; testmultiaudio.c, if nothing else, is an example
of this.

Capture also will now fire the callback in these conditions, offering nothing
but silence.

Apps can check SDL_GetAudioDeviceStatus() or listen for the
SDL_AUDIODEVICEREMOVED event if they want to gracefully deal with
an opened audio device that has been unexpectedly lost.
2017-02-26 00:12:33 -05:00
Ryan C. Gordon
5728cb2025 audio: Make sure the disk and dummy targets are the last ones we try to init. 2017-02-26 00:10:02 -05:00
David Ludwig
b13c443cd8 WinRT: removed buildbot debug code, pending further research 2017-02-24 20:49:14 -05:00
David Ludwig
f7bfa3b79e WinRT: more buildbot debug code 2017-02-24 20:19:28 -05:00
David Ludwig
ecb1eb823e WinRT: added code to help debug a buildbot error 2017-02-24 19:59:57 -05:00
Sam Lantinga
71a4e8ed13 Stop CoreAudio from doing expensive audio rate conversion 2017-02-23 12:10:02 -08:00
Sam Lantinga
a9762551cd Added config for the Razer Wildcat on Mac OS X 2017-02-20 11:02:35 -08:00
Philipp Wiesemann
cfcec57f42 Fixed comment. 2017-02-19 21:05:09 +01:00
Sam Lantinga
9428ff19a9 Added support for the Razer Wildcat on Linux 2017-02-17 17:46:58 -08:00