Commit graph

9461 commits

Author SHA1 Message Date
Ryan C. Gordon
15aac37097 README-hg.md: Updated main Mercurial website. 2017-04-01 00:17:15 -04:00
Ryan C. Gordon
cd2c9aa359 BUGS.txt: Changed mailing list link to discourse.libsdl.org.
I think we're solid on this? We can always back this changeset out.  :)
2017-04-01 00:05:25 -04:00
Ryan C. Gordon
db1d484721 android: fix wrong events when locking device in landscape (thanks, Joshua!).
"Using an application in portrait orientation, turning off the device would
dispatch SDL_APP_WILLENTERBACKGROUND, then SDL_APP_DIDENTERBACKGROUND then
lock the screen.

However, rotating the application the application to landscape, then turning
off the device would incorrectly dispatch SDL_APP_WILLENTERBACKGROUND,
SDL_APP_WILLENTERBACKGROUND, SDL_APP_WILLENTERFOREGROUND and then
SDL_APP_DIDENTERFOREGROUND before locking the screen. You can imagine how
this created trouble :)

It appears this occurs because (on this application) turning off a device
when in landscape is triggering a resize. The resize logic in SDLActivity
triggers a resume.

This patch has resolved the issue on my device:

It prevents the dispatch of (improper) FOREGROUND events when locking
the device, but we get still events when the device is turned back on
and unlocked."
2017-03-31 23:43:53 -04:00
Sam Lantinga
b666f8701e __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
85f43ff246 wasapi: deal with default device changes, and more robust failure recovery. 2017-03-30 16:33:47 -04:00
Ryan C. Gordon
3a641f7b0b 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
5978bddd06 Patched to compile on some platforms. 2017-03-29 12:04:17 -04:00
James Legg
703deb80e2 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
2573690129 Removed newlines from error messages. 2017-03-26 21:00:19 +02:00
Sam Lantinga
e9a74e397e Updated axis/button mapping for Dualshock 3, for upcoming Sony driver changes 2017-03-23 13:53:09 -07:00
Philipp Wiesemann
03f2036f17 iOS: Fixed compiling template on C89 compilers. 2017-03-19 22:17:01 +01:00
Philipp Wiesemann
5113f098ed Removed unused constant in testgesture program. 2017-03-19 22:16:37 +01:00
Philipp Wiesemann
b085fcb6d9 Updated file name in porting README. 2017-03-19 22:16:24 +01:00
Brandon Schaefer
01812a0ca5 mir: Set the max/min w/h vs just setting the window w/h 2017-03-18 13:57:57 -07:00
Sam Lantinga
4fdfeb9f42 Backed out changeset 90e5cb81c483 - testaudiocapture.c already does what we want 2017-03-16 16:45:12 -07:00
Sam Lantinga
8b764c2a46 Added an audio recording test program 2017-03-15 11:39:54 -07:00
Sam Lantinga
fbdef053be 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
c700579448 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
89e73e7c17 differentiate between capture / playback audio thread names 2017-03-14 07:16:56 -07:00
Sam Lantinga
47e7307c38 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
46a750cf1d Fixed tabs to spaces 2017-03-09 15:12:19 -08:00
Sam Lantinga
c0a9b93331 Added support to loopwave for hotplugging audio devices 2017-03-09 14:50:23 -08:00
Sam Lantinga
68951fdb4b Fixed compile error with gcc -std=c99 2017-03-06 21:25:06 -08:00
Philipp Wiesemann
17ff797d83 Fixed warning about implicit conversion in controllermap program. 2017-03-04 23:05:47 +01:00
Philipp Wiesemann
26916c278c Mir: Fixed crash if creating default cursor failed.
Found by Cppcheck.
2017-03-04 23:05:32 +01:00
Philipp Wiesemann
c57b6def21 Linux: Fixed error message. 2017-03-04 23:05:11 +01:00
Ryan C. Gordon
f9c06200b0 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
82d0a04881 Fix some more compiler warnings on armcc. 2017-03-03 16:38:17 -05:00
Ryan C. Gordon
04142af157 Some patches to make SDL compile with armcc (ARM's C compiler). 2017-03-02 13:33:04 -05:00
Brandon Schaefer
86906a708a mistake: Revert the files that I did not mean to commit 2017-03-01 15:05:54 -08:00
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