Commit graph

9481 commits

Author SHA1 Message Date
Brandon Schaefer
b2e704d70c * Some refactoring and bug fixes. Thanks Michał Kuchta! 2017-03-01 14:50:59 -08:00
Ryan C. Gordon
400fc682f0 raspberrypi: RPI_Destroy() should free the SDL_VideoDevice and its driverdata.
--HG--
extra : rebase_source : ee965980b03c7bab3baba10914da004319911714
2017-02-28 19:48:52 -05:00
Brandon Schaefer
c4a4e36e88 mir: Get ready for Mir 1.0, clean up deprecations. Thanks Michał Kuchta! 2017-02-27 12:20:16 -08:00
Ryan C. Gordon
2cc7158cb4 audio: clarified what SDL_AudioSpec::samples is, removed note about power of 2.
These don't have to be power-of-2 sizes anymore because of SDL_AudioStream,
and the new resampler, but also, many platforms don't give you power-of-2 DMA
buffer in the first place!

--HG--
extra : rebase_source : ec43e17a761b218f314092952ea5d3861a00b7af
2017-02-27 10:11:40 -05:00
Philipp Wiesemann
5d01b5835b Fixed comment style. 2017-02-26 21:20:39 +01:00
Ryan C. Gordon
dea6213bed Updated generated configure script. 2017-02-26 01:03:39 -05:00
Ryan C. Gordon
45e302d5bc Patched to compile on C89 compilers. 2017-02-26 00:56:13 -05:00
Ryan C. Gordon
af08cc2cf8 configure: Cygwin and MingW should try to use -Wdeclaration-after-statement. 2017-02-26 00:54:45 -05:00
Ryan C. Gordon
ca264fd374 audio: Try to keep callbacks firing at normal pace when device is lost.
--HG--
extra : histedit_source : 6af6e582c33b800c543fd1f4d73e99fe4cbba824
2017-02-26 00:39:22 -05:00
Ryan C. Gordon
844a3da31c Removed a bunch of unnecessary #ifdefs.
--HG--
extra : rebase_source : 9cf2e2cb22842f1545821e5c2da4e288a167937c
extra : histedit_source : 9c510330022bfcbb6682cfcaf3e885dd5e15c47b%2C049a8d27b60d4b9a61f5a86a5c799cdc669516ce
2017-02-26 00:40:04 -05:00
Ryan C. Gordon
0e1aaaeceb 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.

--HG--
extra : rebase_source : 8d6cf4c4e88a98cc85558693aff30fac25a8ed7e
2017-02-26 00:12:33 -05:00
Ryan C. Gordon
80cffbfbb1 audio: Make sure the disk and dummy targets are the last ones we try to init.
--HG--
extra : rebase_source : 68fbb52bf496d1430aba671e047b90be5cc524b7
2017-02-26 00:10:02 -05:00
David Ludwig
9181f3f80f WinRT: removed Windows 8.0 from build-bot + NuGet package creation scripts
According to Steam's OS stats, Windows 8.0 use is pretty much nil.  Further,
Microsoft hasn't support Windows 8.0 development in any of their
actively-updated toolchains, and setting it up can be a pain.

In theory, SDL2 still supports Windows 8.0, however building of Windows 8.0
.dlls is no longer the default, if and when using the 'winrtbuild.*' scripts.
The MSVC 2012 project files for building Windows 8.0 dlls remain, though,
for the time being.
2017-02-25 21:23:12 -05:00
David Ludwig
ba71c20914 WinRT: removed buildbot debug code, pending further research 2017-02-24 20:49:14 -05:00
David Ludwig
b2e9ec7749 WinRT: more buildbot debug code 2017-02-24 20:19:28 -05:00
David Ludwig
d144271806 WinRT: added code to help debug a buildbot error 2017-02-24 19:59:57 -05:00
Ryan C. Gordon
b0ea193974 cmake: add WASAPI audio target to the build (thanks, Martin!).
Fixes Bugzilla #3588.
2017-02-23 22:38:04 -05:00
Sam Lantinga
6807260aa0 Stop CoreAudio from doing expensive audio rate conversion 2017-02-23 12:10:02 -08:00
Sam Lantinga
8c7c505d4d Added config for the Razer Wildcat on Mac OS X 2017-02-20 11:02:35 -08:00
Sam Lantinga
cc640593fa Updated iOS fat build 2017-02-20 10:55:49 -08:00
Sam Lantinga
c1277f268e Updated config headers to override the base SDL_config.h if both are included 2017-02-20 10:55:33 -08:00
Philipp Wiesemann
d4b70bb32a Fixed warnings if compiling loopwave programs with C++. 2017-02-19 21:05:42 +01:00
Philipp Wiesemann
20be81a7ba Updated library name in header file. 2017-02-19 21:05:26 +01:00
Philipp Wiesemann
dfc88c07e4 Fixed comment. 2017-02-19 21:05:09 +01:00
Sam Lantinga
aa71a836f3 Added support for the Razer Wildcat on Linux 2017-02-17 17:46:58 -08:00
Charlie Birks
763361269e Emscripten: implement custom cursors 2017-02-17 10:13:17 +00:00
Charlie Birks
ae0a253e82 Emscripten: refactor cursor handling 2017-02-17 10:13:12 +00:00
Charlie Birks
4229ae8220 Remove link to emscripten tests
Not updated since early port. Also stopped working when Dropbox
stopped allowing HTML to be parsed.
2017-02-17 10:13:10 +00:00
Charlie Birks
579a3245b1 Emscripten: only update pixel ratio if HiDPI is enabled 2017-02-17 10:13:07 +00:00
Ryan C. Gordon
12a722b4ba 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
acfd5f20dd More HTTPS doc tweaks.
(mostly I'm testing buildbot though.  :)   )
2017-02-16 16:59:07 -05:00
Ryan C. Gordon
ed6c776eb0 More HTTPS changes in the documentation. 2017-02-16 16:52:03 -05:00
Ryan C. Gordon
927b70a3ad readme: more HTTPS changes. 2017-02-16 13:55:12 -05:00
Ryan C. Gordon
d7c5510795 readme: correct webpage URL to use HTTPS. 2017-02-16 13:30:34 -05:00
Ryan C. Gordon
40bb6c3811 Patched to compile on Windows.
--HG--
extra : histedit_source : 07e673b994f192be60bdfae996b2e5817170c23b
2017-02-14 03:12:09 -05:00
Ryan C. Gordon
d862693a74 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
e0bd890446 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
27741f8136 thread: Don't use SetThreadDescription on WinRT right now.
Can't LoadLibrary for it, but not sure if it's actually available there yet.

--HG--
extra : rebase_source : 23c8c9fd2e03c216eaa2347ac8b9932b4f08ebc7
2017-02-13 17:05:14 -05:00
Ryan C. Gordon
488c32369f windows: Try to unify all the GUID comparison code into a core helper function.
There are likely several more I missed.

--HG--
extra : rebase_source : 97027924da3469089e7be686a0762ae7c1290ce6
2017-02-13 17:00:46 -05:00
Ryan C. Gordon
5f815aef8e 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.

--HG--
extra : rebase_source : d4fe82446acbdd927b352c6f66e95d85be7ae46f
2017-02-13 16:59:02 -05:00
Ryan C. Gordon
df1251ae4c 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.

--HG--
extra : rebase_source : e3c0970c4f954a1296220ebc4b04c8e95a32d5f3
2017-02-13 16:56:41 -05:00
Ryan C. Gordon
554e4ad86b audio: Added a ThreadDeinit() method to match ThreadInit.
Not used by any targets at the moment, but will be shortly!

--HG--
extra : rebase_source : 0c60a1caf9cefe05d50ea48aa67bf571e2590a60
2017-02-13 16:55:00 -05:00
Sam Lantinga
923867b8c8 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/5a77f977ad95/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
a59fecb26f 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
121cd476bc 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
bb16c71b71 Fixed warning in Android build 2017-02-10 09:41:16 -08:00
Sam Lantinga
1eb402365e Log the error returned by XAudio2Create() 2017-02-09 06:01:14 -08:00
Philipp Wiesemann
6fb11d8e35 Windows: Fixed warning about unused variable.
Found by buildbot.
2017-02-03 23:30:43 +01:00
Philipp Wiesemann
0ab0fb445c Fixed typo in log message. 2017-02-03 23:30:29 +01:00
Sam Lantinga
19671bbea6 Fixed build on Apple TV 2017-02-02 16:56:02 -08:00