Commit Graph

885 Commits

Author SHA1 Message Date
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
Charlie Birks
0d647d35b0 Emscripten: implement custom cursors 2017-02-17 10:13:17 +00:00
Charlie Birks
33bddcfda2 Emscripten: refactor cursor handling 2017-02-17 10:13:12 +00:00
Charlie Birks
613955b4f2 Emscripten: only update pixel ratio if HiDPI is enabled 2017-02-17 10:13:07 +00:00
Ryan C. Gordon
e8677a1bd2 audio: Added basic WAVE_FORMAT_EXTENSIBLE support to .wav loader.
This is just enough to get you through a file that just used the extended
header for float or int data. It doesn't handle all the other things that
you expect from this header, like 24-bit samples inside a 32-bit container
or speaker masks.
2017-02-17 02:25:37 -05:00
Ryan C. Gordon
1ed41d6d0d Patched to compile on Windows. 2017-02-14 03:12:09 -05:00
Ryan C. Gordon
6046fd4cb0 wasapi: Initial WASAPI support, for Windows Vista and later.
This should remain binary compatible with Windows XP, as we dynamically
load anything we need and fall back to DirectSound/WinMM/XAudio2 if not
available.
2017-02-14 03:03:27 -05:00
Ryan C. Gordon
c93bca489d stdlib: Fixed crash on SDL_snprintf("%s", NULL).
Like other C runtimes, it should probably produce the string "(null)".

This bug probably only affected Windows, as most platforms use their standard
C runtime's snprintf().
2017-02-14 02:49:08 -05:00
Ryan C. Gordon
d1eb2d190d thread: Don't use SetThreadDescription on WinRT right now.
Can't LoadLibrary for it, but not sure if it's actually available there yet.
2017-02-13 17:05:14 -05:00
Ryan C. Gordon
70c0400b12 windows: Try to unify all the GUID comparison code into a core helper function.
There are likely several more I missed.
2017-02-13 17:00:46 -05:00
Ryan C. Gordon
e5fc93baca audio: Don't wrap bootstrap declarations in preprocessor macros.
They are harmless and ignored if we don't actually link against them. The
preprocessor checks elsewhere if they're actually used.
2017-02-13 16:59:02 -05:00
Ryan C. Gordon
ad9c702f6a audio: SDL_AudioStream's *_sample_frame_size should be in bytes, not bits.
Fixes failures where SDL_AudioStreamGet() incorrectly thinks it got a partial
sample frame request.
2017-02-13 16:56:41 -05:00
Ryan C. Gordon
175f1e8f4a audio: Added a ThreadDeinit() method to match ThreadInit.
Not used by any targets at the moment, but will be shortly!
2017-02-13 16:55:00 -05:00
Sam Lantinga
886736a2c8 Fixed bug 3584 - Small stack size for audio callback thread
Walter van Niftrik

We have found that since SDL 2.0.5 the audio callback thread is created with a very small stack size. In our application this is leading to stack overflows.

We believe there is a bug at http://hg.libsdl.org/SDL/file/391fd532f79e/src/audio/SDL_audio.c#l1132, where the is_internal_thread flag appears to be inverted.
2017-02-11 16:38:16 -08:00
Sam Lantinga
cf31ea1478 Fixed bug 3583 - X11 touch device can be permanently lost
Volumetric

In X11 the SDL error "Unknown touch device" can occur after which the application stops recognizing touch events. For a kiosk-type application this results in a hang as far as the user is concerned. This is reproducible on HP Z220/Z230/Z240 workstations by swapping USB cables for a while and it also occurs with no physical changes, probably due to USB device power management. A workaround is to make SDL re-enumerate the touch devices like it does at startup. A patch is attached.
2017-02-11 11:14:48 -08:00
Sam Lantinga
06ccb71bcd Make sure the memory barrier functions are always available, and now they are implemented on Android __ARM_ARCH_5TE__ 2017-02-10 11:21:15 -08:00
Sam Lantinga
9171f71dbe Fixed warning in Android build 2017-02-10 09:41:16 -08:00
Sam Lantinga
107c19daad Log the error returned by XAudio2Create() 2017-02-09 06:01:14 -08:00
Philipp Wiesemann
8eee82cd84 Windows: Fixed warning about unused variable.
Found by buildbot.
2017-02-03 23:30:43 +01:00
Philipp Wiesemann
33ff5bd148 Fixed typo in log message. 2017-02-03 23:30:29 +01:00
Sam Lantinga
8f78f5bb94 Fixed build on Apple TV 2017-02-02 16:56:02 -08:00