Commit graph

11215 commits

Author SHA1 Message Date
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
Sam Lantinga
a811278568 Updated documentation to note that libvulkan-dev is no longer needed 2017-09-09 07:45:31 -07:00
Sam Lantinga
f5995088a3 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
d26a67c874 We don't need libvulkan-dev to build Vulkan support 2017-09-09 07:35:55 -07:00
Sam Lantinga
296d251a0b Updated Debian changelog for 2.0.6 release 2017-09-09 07:30:25 -07:00
Sam Lantinga
56af866ead 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
89bd883fa7 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
6910f9a4d0 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
6d03df314b 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
1dd4075b8c Fixed 64-bit build warning 2017-09-08 15:08:03 -07:00
Sam Lantinga
c81cbcc940 We don't need to pass the renderer into SDLTest_CleanupTextDrawing() 2017-09-08 04:53:31 -07:00
Sam Lantinga
a23db8ea59 Fixed build 2017-09-08 04:38:46 -07:00
Sam Lantinga
c3070d2b3a Added a function to clean up test text drawing 2017-09-08 04:14:05 -07:00
Ryan C. Gordon
59bc23e03c wave: SDL_LoadWAV now supports 24-bit audio. 2017-09-07 10:56:08 -04:00
Ryan C. Gordon
0e764933cd vulkan: use "unsigned int" instead of "unsigned"
--HG--
extra : rebase_source : 4951a859bb64e3273212000bba0f34e1f8e3c53e
2017-09-06 19:35:36 -04:00
Ryan C. Gordon
a3dc8c13ff raspberrypi: The latest Raspbian moved its EGL and GLES2 libs elsewhere.
Now we try the new (hardware-specific) pathnames first, and if those fail to
load, we'll try the more generic names that earlier versions of Raspbian used.

Fixes Bugzilla #3800.

--HG--
extra : rebase_source : 70aa1b79ca60822e3c9dcc7ffffe4970b36cbb10
2017-09-06 19:34:23 -04:00