Commit graph

10030 commits

Author SHA1 Message Date
Jools Wills
de5988402f packaging fixes -
* updated debian/control to match debian/ubuntu package names
 * fix libudev dependency
 * rename libsdl2.install -> libsdl2-2.0-0.install
2017-10-04 15:11:26 +01:00
Jools Wills
1becf4794f Revert "Linux joystick: Look at entire axis namespace for controls (thanks, "spaz16"!)."
This reverts commit 4cb7923f25.

see https://github.com/RetroPie/RetroPie-Setup/issues/1297
2017-10-04 15:11:01 +01:00
Sam Lantinga
f486f87816 Fixed Mac OS X build 2017-09-22 11:25:52 -07:00
Sam Lantinga
1a34539bdf The volume was too high, clamp to SDL_MIX_MAXVOLUME 2017-09-22 11:15:57 -07:00
Sam Lantinga
796d1f6645 Fixed audio being silent on older iOS devices
Tested on an iPod running iOS 6.1
2017-09-22 11:15:14 -07:00
Sam Lantinga
6ae4a6f2e3 Added instructions for deploying to older iOS devices (thanks Sylvain!) 2017-09-22 11:13:34 -07:00
Sam Lantinga
0273dd1d92 Avoid duplicate joystick axis events 2017-09-22 08:56:09 -07:00
Sam Lantinga
d58b502fad Fixed memory leak when HAVE_ALLOCA isn't defined 2017-09-22 08:51:45 -07:00
Mark Callow
21e8d3d8d4 Avoid hitting ERR_MAX_STRLEN limit. 2017-09-22 22:30:02 +09:00
Ryan C. Gordon
d06b6e98c5 audio: Stream resampling now saves some samples from previous run for padding.
Previously, the padding was silence, which was a problem when streaming since
you would sample a little bit of this silence between each buffer.

We still need a means to get padding data for the right hand side, but this
patch makes the resampler output more correct.

--HG--
extra : amend_source : 0cc91e0b0d6c2314a435a252d88c123c8fa58bfc
2017-09-22 07:42:24 -04:00
Brandon Schaefer
39c91a2406 [egl/mir] Need eglGetProc to find gl 4.5 core profile extensions 2017-09-21 18:38:07 -07:00
Alex Szpakowski
0bd7b4315c iOS MoltenVK code style cleanup. 2017-09-21 20:30:25 -03:00
Alex Szpakowski
82683927b2 iOS: Fix compiling using the iOS 7 SDK, partially broken since MoltenVK support was added.
Note that apps submitted to the iOS App Store *must* use a modern iOS SDK (currently iOS 10 is probably the minimum), however the SDK used to build is separate from the minimum iOS version an app supports at runtime.
2017-09-21 20:11:44 -03:00
Sam Lantinga
e247fc4d55 A hint with an empty string should be treated as the default value 2017-09-21 14:48:03 -07:00
Sam Lantinga
28013a650a Only apply the jitter filter to prevent unexpected motion on axes that haven't been touched. 2017-09-21 10:29:17 -07:00
Sam Lantinga
91339af74b Fixed bug 3788 - software renderer crashes in SDL_RenderCopyEx with rotation and dstrect w or h is 0
Anthony

This is what's making the software renderer crash with rotated destination rectangles of w or h = 0:

SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "2");
2017-09-21 01:22:40 -07:00
Sam Lantinga
26f9eab102 Added some missing "extern" declarations 2017-09-21 00:55:29 -07:00
Ryan C. Gordon
2f484d4e3a audio: removed my perl experiment script.
--HG--
extra : histedit_source : be66a1e28b142b6499cee293f281a8c85bd426f0
2017-09-21 02:06:53 -04:00
Ryan C. Gordon
4509de166f audio: Replaced the resampler. Again.
This time it's using real math from a real whitepaper instead of my previous
amateur, fast-but-low-quality attempt. The new resampler does "bandlimited
interpolation," as described here: https://ccrma.stanford.edu/~jos/resample/

The output appears to sound cleaner, especially at high frequencies, and of
course works with non-power-of-two rate conversions.

There are some obvious optimizations to be done to this still, and there is
other fallout: this doesn't resample a buffer in-place, the 2-channels-Sint16
fast path is gone because this resampler does a _lot_ of floating point math.
There is a nasty hack to make it work with SDL_AudioCVT.

It's possible these issues are solvable, but they aren't solved as of yet.
Still, I hope this effort is slouching in the right direction.

--HG--
extra : rebase_source : 2178d7f422d118dfb76608964f63d290b18c7408
extra : histedit_source : 5461b7f3025ed6c09213910a563318c95d185bf3%2C4a6a6c4c38784b4bc5f241d963c0d752c73ea5b9
2017-09-21 02:51:14 -04:00
Mark Callow
c35e060b0e macOS: remove unneeded #includes. 2017-09-21 14:01:12 +09:00
Sam Lantinga
5c40ed9e32 Reverted Alex's commit 4f3f29b6b666 - we're about to release 2.0.6, don't remove support for the iOS 7 SDK yet. 2017-09-20 19:59:34 -07:00
Alex Szpakowski
28abba9281 iOS: I don't think SDL compiles with the iOS 7 SDK anymore, so we might as well drop the #ifdefs trying to guard for that. 2017-09-20 11:01:32 -03:00
Alex Szpakowski
aed276aa9c iOS: remove an unused static variable 2017-09-20 10:53:41 -03:00
David Ludwig
354be66d13 WinRT: minor formatting tweak in README-winrt 2017-09-19 10:33:08 -04:00
David Ludwig
b95da19f0c WinRT: noted UWP's inability to work with some game controllers 2017-09-19 10:31:22 -04:00
Sam Lantinga
1e197f83b5 Added a hint SDL_HINT_AUDIO_CATEGORY to control the audio category,
determining whether the phone mute switch affects the audio
2017-09-15 17:27:32 -07:00
Patrice Mandin
2f3634ab69 Fix for 3829. Revert adding GameSir G4s, uses same GUID as PS3 controller. 2017-09-14 21:45:14 +02:00
Patrice Mandin
0c9c2d6667 Readd support for GameSir G4s, lost with changeset 11431 2017-09-14 19:33:32 +02:00
Sam Lantinga
c5b0b2906e Updated iOS keyboard test to cover text input rect and orientation changes 2017-09-14 09:56:16 -07:00
Sam Lantinga
e09d2c5302 Fixed iOS keyboard positioning, based on the final position rather than the initial one 2017-09-14 09:55:27 -07:00
Ryan C. Gordon
1447f36c23 surface: Make sure SDL_ConvertSurface() deals with palettes (thanks, Sylvain!).
Fixes Bugzilla #3826.
Fixes Bugzilla #2979.
2017-09-14 08:37:27 -04:00
Sam Lantinga
e02dfdf9f2 Added support for the PDP Battlefield One Xbox One controller on Linux 2017-09-12 05:53:47 -07:00
David Ludwig
cfb70e2f3f WinRT: build fix when using recent versions of the Windows 10 SDK 2017-09-11 18:20:56 -04:00
Sam Lantinga
dd811b635b Fixed bug 3812 - Fallthrough warnings gcc-7 2017-09-10 12:54:40 -07:00
Sam Lantinga
4db5c5d4d9 Fixed bug 3815 - implicit-fallthrough warning - DUFFS_LOOP4 and friends 2017-09-10 12:49:41 -07:00
Sam Lantinga
308214d453 Fixed bug 3813 - gcc7 fallthrough warnings in SDL_iconv.c and SDL_pixels.c 2017-09-10 12:42:38 -07:00
Sam Lantinga
65a1b9b06c Fixed tabs to spaces 2017-09-10 12:40:45 -07:00
Sam Lantinga
e2e34a29a8 Fixed compile warning 2017-09-10 10:43:04 -07:00
Sam Lantinga
b19c785d6e Fixed bug 3811 - change HAVE_COPYSIGN to HAVE__COPYSIGN in SDL_config_windows.h
Ozkan Sezer

The patch below changes HAVE_COPYSIGN macro in SDL_config_windows.h to
HAVE__COPYSIGN, so that _copysign() can be used in SDL_stdlib.h which
is available in many more windows-targeting toolchains such as MinGW,
MSVC >= 6, etc, and not just  MSVC >= 2013. SDL_stdlib.c already has a
specific check for HAVE__COPYSIGN, so I believe this is reasonable.
2017-09-10 10:30:25 -07:00
Sam Lantinga
1eacf84874 Fixed the include path for khronos with Visual Studio 2017-09-10 10:25:36 -07:00
Sam Lantinga
014bb323c8 Correction: copysign has been supported by windows several toolchains
for a very long time, including MSVC6, MinGW, LCC-Win32, (no released
watcom versions though, but that's of no concern.)

Patch from Ozkan Sezer
2017-09-10 09:19:10 -07:00
Ryan C. Gordon
1e31971896 alsa: removed snd_pcm_wait() call before writing to playback device.
This would cause playback problems in certain situations, such as on the
Raspberry Pi. The device that the wait was added for seems to not benefit from
it in modern times, and standard desktop Linux seems to do the right thing
when a USB device is unplugged now, without this patch.

Fixes Bugzilla #3599.
2017-09-09 21:17:46 -04:00
Sam Lantinga
24522941fe Updated documentation so it's clear you should use SDL_SetWindowDisplayMode() to change the size of fullscreen windows. 2017-09-09 11:04:35 -07:00
Sam Lantinga
323a05942b Fixed bug 3809 - Restore after maximize leads to wrong size
Andreas Falkenhahn

My app opens a 640x480 window. When I click on the window's maximize button, the window correctly fills the entire screen and loses its borders. But clicking on the restore button now doesn't restore the window to its original 640x480 size. Instead, the window size is identical to the screen size now. The only difference to the previous state is that the window now has borders again but it isn't restored to 640x480.
2017-09-09 11:00:25 -07:00
Sam Lantinga
b7ee4f5867 Fixed bug 3719 - Cocoa - Incorrect window size when leaving fullscreen
bastien.bouclet

The window is now resized to its specified size, but it moves to the top left corner of the screen. That is unexpected because neither the user nor the program moved it there. Test program attached (the same one as before).
2017-09-09 10:31:44 -07:00
Sam Lantinga
29bf554421 Fixed window size when leaving fullscreen mode (thanks Eric!) 2017-09-09 09:31:12 -07:00
Sam Lantinga
73a2b9ace8 Fixed bug 3760 - RWops doesn't check for integer overflow when stdio_fseek only supports 32 bits
Simon Hug

When RWops seeks with fseek or fseeko it uses the types long or off_t which can be 32 bits on some platforms. stdio_seek does not check if the 64-bit integer for the offset fits into a 32-bit integer. Offsets equal or larger than 2 GiB will have implementation-defined behavior and failure states would be very confusing to debug.

The attached patch adds range checking by using the macros from limits.h for long type and some bit shifting for off_t because POSIX couldn't be bothered to specify min and max macros.

It also defines HAVE_FSEEKI64 in SDL_config_windows.h so that the Windows function gets picked up automatically with the default config.

And there's an additional error message for when ftell fails.
2017-09-09 08:36:37 -07:00
Sam Lantinga
12ccc0815f Make sure the libtool archives are installed 2017-09-09 08:34:46 -07:00
Sam Lantinga
98eb529fac Fixed bug 3808 - fix a typo in SDL_stretch.c
Ozkan Sezer

The following patch fixes a minor _MSC_VER typo in SDL_stretch.c,
and also does a tiny tidy-up for assembly opcodes cpp checks.
2017-09-09 08:20:56 -07:00
Sam Lantinga
d57df88e87 Updated config.guess and config.sub, added config.sub.patch for NaCl and Emscripten build support 2017-09-09 08:03:23 -07:00