Fri, 07 Oct 2016 18:03:08 -0700Fixed bug 3043 - fix alsa configury and cmake checks
Sam Lantinga <slouken@libsdl.org> [Fri, 07 Oct 2016 18:03:08 -0700] rev 10490
Fixed bug 3043 - fix alsa configury and cmake checks

Ozkan Sezer

SDL's alsa uses snd_pcm_recover() which has been available only since alsa-lib-1.0.11.

Fri, 07 Oct 2016 18:00:30 -0700Fixed bug 3029 - software renderer cuts off edges when rotate-blitting with a multiple of 90 degrees
Sam Lantinga <slouken@libsdl.org> [Fri, 07 Oct 2016 18:00:30 -0700] rev 10489
Fixed bug 3029 - software renderer cuts off edges when rotate-blitting with a multiple of 90 degrees

Adam M.

When doing a rotated texture copy with the software renderer, where the angle is a multiple of 90 degrees, one or two edges of the image get cut off. This is because of the following line in sw_rotate.c:
if ((unsigned)dx < (unsigned)sw && (unsigned)dy < (unsigned)sh) {
which is effectively saying:
if (dx >= 0 && dx < src->w-1 && dy >= 0 && dy < src->h-1) {

As a result, it doesn't process pixels in the right column or bottom row of the source image (except when they're accessed as part of the bilinear filtering for nearby pixels). This causes it to look like the edges are cut off, and it's especially obvious with an exact multiple of 90 degrees.

Fri, 07 Oct 2016 17:58:02 -0700Fixed bug 3022 - SDL_UnlockMutex(SDL_EventQ.lock) in SDL_PeepEvents can cause error when lock is null
Sam Lantinga <slouken@libsdl.org> [Fri, 07 Oct 2016 17:58:02 -0700] rev 10488
Fixed bug 3022 - SDL_UnlockMutex(SDL_EventQ.lock) in SDL_PeepEvents can cause error when lock is null

Fri, 07 Oct 2016 17:49:33 -0700Fixed bug 2983 - Update Android.readme to include Tegra Graphics Debugger compatibility tip
Sam Lantinga <slouken@libsdl.org> [Fri, 07 Oct 2016 17:49:33 -0700] rev 10487
Fixed bug 2983 - Update Android.readme to include Tegra Graphics Debugger compatibility tip

Michael Labbé

NVidia has released some pretty nice Tegra profiling tools for their Android devices. The NVidia Tegra Graphics Debugger works by providing an interposer library that intercepts ES2 and EGL calls. You must link against these libraries.

Unfortunately, this quietly fails with SDL2 because libEGL and libGLES2 are dynamically loaded with dlopen().

NVidia offers a secondary approach to using the Tegra Graphics Debugger: root your device and install a global interposer library. Almost no devs will try this first if they don’t have a rooted device.

I propose an update to the Android readme that explains why the static linking approach recommended by NVidia doesn’t work.

Fri, 07 Oct 2016 17:46:58 -0700Converted README documentation to DOS text format
Sam Lantinga <slouken@libsdl.org> [Fri, 07 Oct 2016 17:46:58 -0700] rev 10486
Converted README documentation to DOS text format

Fri, 07 Oct 2016 17:30:21 -0700Fixed bug 2957 - De-reference rz_src without NULL check in SDLgfx_rotateSurface function
Sam Lantinga <slouken@libsdl.org> [Fri, 07 Oct 2016 17:30:21 -0700] rev 10485
Fixed bug 2957 - De-reference rz_src without NULL check in SDLgfx_rotateSurface function

Nitz

In function SDLgfx_rotateSurface:

rz_dst =
SDL_CreateRGBSurface(SDL_SWSURFACE, dstwidth, dstheight + GUARD_ROWS,
rz_src->format->Rmask, rz_src->format->Gmask,
rz_src->format->Bmask, rz_src->format->Amask);

Here rz_src get De-referenced without NULL check, which is risky.

Fri, 07 Oct 2016 17:26:25 -0700Fixed bug 2956 - De-reference videodata without NULL check in X11_DispatchEvent(_THIS) function
Sam Lantinga <slouken@libsdl.org> [Fri, 07 Oct 2016 17:26:25 -0700] rev 10484
Fixed bug 2956 - De-reference videodata without NULL check in X11_DispatchEvent(_THIS) function

Fri, 07 Oct 2016 17:23:20 -0700Fixed bug 2952 - SDL_MixAudioFormat does not support audio format AUDIO_U16LSB/AUDIO_U16MSB
Sam Lantinga <slouken@libsdl.org> [Fri, 07 Oct 2016 17:23:20 -0700] rev 10483
Fixed bug 2952 - SDL_MixAudioFormat does not support audio format AUDIO_U16LSB/AUDIO_U16MSB

Simon Sandström

As stated in Summary. The switch statement will execute the default case and set a SDL error message: "SDL_MixAudio(): unknown audio format".

There are atleast two more problems here:

1. SDL_MixAudioFormat does not notify the user that an error has occured and that a SDL error message was set. It took me awhile to understand why I couldn't mix down the volume on my AUDIO_U16LSB formatted audio stream.. until I started digging in the SDL source code.

2. The error message is incorrect, it should read: "SDL_MixAudioFormat(): unknown audio format".

Fri, 07 Oct 2016 17:04:58 -0700Fixed bug 2924 - SDL_CreateRGBSurface[From] versions that take SDL_PIXELFORMAT enum
Sam Lantinga <slouken@libsdl.org> [Fri, 07 Oct 2016 17:04:58 -0700] rev 10482
Fixed bug 2924 - SDL_CreateRGBSurface[From] versions that take SDL_PIXELFORMAT enum

Daniel Gibson

Currently, SDL_CreateRGBSurface() and SDL_CreateRGBSurfaceFrom() take Uint32 masks for RGBA to "describe" the Pixelformat of the surface.
Internally those value are only used to map to one of the SDL_PIXELFORMAT_* enum values that are used for further processing.

I think it would be both handy and more efficient to be able to specify SDL_PIXELFORMAT_* yourself without using SDL_PixelFormatEnumToMasks() to create masks first, so I implemented functions that do that:
SDL_CreateRGBSurfaceWithFormat() and SDL_CreateRGBSurfaceWithFormatFrom() which are like the versions without "WithFormat" but instead of taking 4 Uint32s for R/G/B/A masks, they take one for a SDL_PIXELFORMAT_* enum value.

Together with https://bugzilla.libsdl.org/show_bug.cgi?id=2923 creating a SDL_Surface* from RGBA data (e.g. from stb_image) is as easy as
surf = SDL_SDL_CreateRGBSurfaceWithFormat(0, w, h, bppToUse*8, SDL_PIXELFORMAT_RGBA32);

Fri, 07 Oct 2016 16:44:42 -0700Fixed bug 2885 - SDL_stdinc.h doesn't need to include iconv.h
Sam Lantinga <slouken@libsdl.org> [Fri, 07 Oct 2016 16:44:42 -0700] rev 10481
Fixed bug 2885 - SDL_stdinc.h doesn't need to include iconv.h

Ryan C. Gordon

We still include iconv.h in SDL_stdinc.h, probably because this header might have referenced the native iconv functions and types directly. Since these are hidden behind a stable ABI now and never just a #define for the system iconv, we shouldn't need this header included from a public SDL header anymore, slowing down external apps compiles and pulling tons of stuff into the namespace.