Commit Graph

10021 Commits

Author SHA1 Message Date
Ryan C. Gordon
80a74e9e0c 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.
2017-09-22 07:42:24 -04:00
Brandon Schaefer
d3a344f215 [egl/mir] Need eglGetProc to find gl 4.5 core profile extensions 2017-09-21 18:38:07 -07:00
Alex Szpakowski
206db431ec iOS MoltenVK code style cleanup. 2017-09-21 20:30:25 -03:00
Alex Szpakowski
7a7cdca1ed 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
2e102d0786 A hint with an empty string should be treated as the default value 2017-09-21 14:48:03 -07:00
Sam Lantinga
18db1a84f7 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
729ebeaadf 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
dcf98a35c7 Added some missing "extern" declarations 2017-09-21 00:55:29 -07:00
Ryan C. Gordon
4415f1baae audio: removed my perl experiment script. 2017-09-21 02:06:53 -04:00
Ryan C. Gordon
b4f6a91429 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.
2017-09-21 02:51:14 -04:00
Mark Callow
a47122ad37 macOS: remove unneeded #includes. 2017-09-21 14:01:12 +09:00
Sam Lantinga
2859e2ca8b 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
95cdaf7350 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
590f16b713 iOS: remove an unused static variable 2017-09-20 10:53:41 -03:00
David Ludwig
fa2501e5b7 WinRT: minor formatting tweak in README-winrt 2017-09-19 10:33:08 -04:00
David Ludwig
8b75cb6e7a WinRT: noted UWP's inability to work with some game controllers 2017-09-19 10:31:22 -04:00
Sam Lantinga
224272207c 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
045bf4d4a4 Fix for 3829. Revert adding GameSir G4s, uses same GUID as PS3 controller. 2017-09-14 21:45:14 +02:00
Patrice Mandin
5ff2c6c6f8 Readd support for GameSir G4s, lost with changeset 11431 2017-09-14 19:33:32 +02:00
Sam Lantinga
e71f36a81a Updated iOS keyboard test to cover text input rect and orientation changes 2017-09-14 09:56:16 -07:00
Sam Lantinga
f37e3f7f4b 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
95ba06d73a 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
a53391c87a Added support for the PDP Battlefield One Xbox One controller on Linux 2017-09-12 05:53:47 -07:00
David Ludwig
f6643391a8 WinRT: build fix when using recent versions of the Windows 10 SDK 2017-09-11 18:20:56 -04:00
Sam Lantinga
bfea4433a7 Fixed bug 3812 - Fallthrough warnings gcc-7 2017-09-10 12:54:40 -07:00
Sam Lantinga
16f6630e80 Fixed bug 3815 - implicit-fallthrough warning - DUFFS_LOOP4 and friends 2017-09-10 12:49:41 -07:00
Sam Lantinga
6da32ac3e6 Fixed bug 3813 - gcc7 fallthrough warnings in SDL_iconv.c and SDL_pixels.c 2017-09-10 12:42:38 -07:00
Sam Lantinga
bb84da0e94 Fixed tabs to spaces 2017-09-10 12:40:45 -07:00
Sam Lantinga
9d72fa278b Fixed compile warning 2017-09-10 10:43:04 -07:00
Sam Lantinga
b7aeb816ce 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
31821f3efb Fixed the include path for khronos with Visual Studio 2017-09-10 10:25:36 -07:00
Sam Lantinga
718b4cb228 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
9f7851d4ca 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
9586c66c22 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
8018cbbff2 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
cdac991978 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
a849b5bcc9 Fixed window size when leaving fullscreen mode (thanks Eric!) 2017-09-09 09:31:12 -07:00
Sam Lantinga
af35942108 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
6918453cfd Make sure the libtool archives are installed 2017-09-09 08:34:46 -07:00
Sam Lantinga
76ccbc7fdb 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
48dcf76584 Updated config.guess and config.sub, added config.sub.patch for NaCl and Emscripten build support 2017-09-09 08:03:23 -07:00
Sam Lantinga
19daa00463 Updated documentation to note that libvulkan-dev is no longer needed 2017-09-09 07:45:31 -07:00
Sam Lantinga
ea862ec7d6 Fixed bug 3807 - Remove restriction from DECLSPEC macro for OS/2
Ozkan Sezer

The following patch removes the unnecessary / wrong
Watcom restriction from the DECLSPEC macro for OS/2.
2017-09-09 07:42:29 -07:00
Sam Lantinga
f77a824d17 We don't need libvulkan-dev to build Vulkan support 2017-09-09 07:35:55 -07:00
Sam Lantinga
34ceb8c279 Updated Debian changelog for 2.0.6 release 2017-09-09 07:30:25 -07:00
Sam Lantinga
4224118986 Fixed bug 3805 - Why is there no --enable-video-rpi option in configure?
Andreas Falkenhahn

When compiling SDL for the Raspberry Pi, I have to use the --host parameter to enable compilation of the native Raspberry Pi video driver, like so:

    --host=arm-raspberry-linux-gnueabihf

It took me a while to figure out that this was necessary in order to have the native Raspberry Pi video driver compiled in. I think it would be better if there was an option like --enable-video-rpi that could be passed to configure and that would also show up when saying configure --help. Currently, it’s rather difficult to figure out that you have to use the --host parameter with arm-raspberry-linux-gnueabihf in order to get Raspberry Pi video support. It’s also somewhat inconsistent because most other video drivers can in fact be enabled/disabled through specific configure parameters but there is no such parameter for the native Raspberry Pi video driver.
2017-09-08 22:21:01 -07:00
Sam Lantinga
beb1154507 Fixed bug 3806 - Fixes for MSVC compiler warnings
Simon Hug

These are the remaining compiler warnings I see in the current tip b3bb3855bc41.

- SDL_test_log.c defines _CRT_SECURE_NO_WARNINGS without checking if it was already set.

- SDL_windowskeyboard.c converts integers to pointers without going over the (U)INT_PTR types. That bothers MSVC.
2017-09-08 18:26:25 -07:00
Sam Lantinga
ce36e765da keep joystick thread from waking unnecessarily, and from possibly blocking for 300ms at shutdown if a joystick was just plugged in
CR: SamL
2017-09-08 07:15:47 -07:00
Sam Lantinga
370c988c76 Fixed building with the first version of Visual Studio 2017, which doesn't have __has_include() (Thanks Simon!) 2017-09-08 15:08:50 -07:00
Sam Lantinga
c98185d075 Fixed 64-bit build warning 2017-09-08 15:08:03 -07:00