Wed, 18 Oct 2017 23:49:46 -0400Check correct variable for malloc() results. default tip
Ryan C. Gordon <icculus@icculus.org> [Wed, 18 Oct 2017 23:49:46 -0400] rev 11634
Check correct variable for malloc() results.

Wed, 18 Oct 2017 19:30:47 -0700Fixed bug 3876 - Resampling of certain sounds adds heavy distortion
Sam Lantinga <slouken@libsdl.org> [Wed, 18 Oct 2017 19:30:47 -0700] rev 11633
Fixed bug 3876 - Resampling of certain sounds adds heavy distortion

Simon Hug

Patch that adds [-1, 1] clamping to the scalar audio type conversions.

This may come from the SDL_Convert_F32_to_X_Scalar functions. They don't clamp the float value to [-1, 1] and when they cast it to the target integer it may be too large or too small for the type and get truncated, causing horrible noise.

The attached patch throws clamping in, but I don't know if that's the preferred way to fix this. For x86 (without SSE) the compiler (I tested MSVC) seems to throw a horrible amount of x87 code in it. It's a bit better with SSE, but probably still quite the performance hit. And SSE2 uses a branchless approach with maxss and minss.

Wed, 18 Oct 2017 19:26:36 -0700Added a staging buffer to the audio stream so that we can accumulate small amounts of data if needed when resampling
Sam Lantinga <slouken@libsdl.org> [Wed, 18 Oct 2017 19:26:36 -0700] rev 11632
Added a staging buffer to the audio stream so that we can accumulate small amounts of data if needed when resampling

Wed, 18 Oct 2017 15:54:05 -0700Added audio stream conversion functions:
Sam Lantinga <slouken@libsdl.org> [Wed, 18 Oct 2017 15:54:05 -0700] rev 11631
Added audio stream conversion functions:
SDL_NewAudioStream
SDL_AudioStreamPut
SDL_AudioStreamGet
SDL_AudioStreamAvailable
SDL_AudioStreamClear
SDL_FreeAudioStream

Wed, 18 Oct 2017 08:52:04 -0700Fixed bug 3821 - Allow SDL_CreateWindow and SDL_CreateRenderer with OpenGL ES 3.0 (GLES3) for Angle (Windows)
Sam Lantinga <slouken@libsdl.org> [Wed, 18 Oct 2017 08:52:04 -0700] rev 11630
Fixed bug 3821 - Allow SDL_CreateWindow and SDL_CreateRenderer with OpenGL ES 3.0 (GLES3) for Angle (Windows)

Carlos

Angle supports GLES3 but when using these functions (SDL_CreateWindow and SDL_CreateRenderer), defaults again to GLES2.0.

A current workaround (hack) to retrieve a GLES3.0 context with Angle is:

1) set

SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 3);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 0);

after InitSDL AND after calling SDL_CreateWindow (before SDL_CreateRenderer)

2) Comment lines 2032-2044 in SDL_render_gles2.c, funtion GLES2_CreateRenderer

window_flags = SDL_GetWindowFlags(window);
if (!(window_flags & SDL_WINDOW_OPENGL) ||
profile_mask != SDL_GL_CONTEXT_PROFILE_ES || major != RENDERER_CONTEXT_MAJOR || minor != RENDERER_CONTEXT_MINOR) {

changed_window = SDL_TRUE;
SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_ES);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, RENDERER_CONTEXT_MAJOR);
SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, RENDERER_CONTEXT_MINOR);

if (SDL_RecreateWindow(window, window_flags | SDL_WINDOW_OPENGL) < 0) {
goto error;
}
}

This retrives a GLES3 context as confirmed using glGetString(GL_VERSION). This should be fixed by modifying a few if's.

Mon, 16 Oct 2017 15:22:40 -0700Fixed compiler warning on iOS
Sam Lantinga <slouken@libsdl.org> [Mon, 16 Oct 2017 15:22:40 -0700] rev 11629
Fixed compiler warning on iOS

Mon, 16 Oct 2017 14:57:42 -0700Fixed bug 3890 - Incomplete fix for CVE-2017-2888
Sam Lantinga <slouken@libsdl.org> [Mon, 16 Oct 2017 14:57:42 -0700] rev 11628
Fixed bug 3890 - Incomplete fix for CVE-2017-2888

Felix Geyer

http://hg.libsdl.org/SDL/rev/7e0f1498ddb5 tries to fix CVE-2017-2888.
Unfortunately compilers may optimize the second condition "(size / surface->pitch) != surface->h" away.
See https://bugzilla.redhat.com/show_bug.cgi?id=1500623#c2
I've verified that this is also the case on Debian unstable (gcc 7.2).

Mon, 16 Oct 2017 14:39:56 -0700Added min/max macros for the sized SDL datatypes
Sam Lantinga <slouken@libsdl.org> [Mon, 16 Oct 2017 14:39:56 -0700] rev 11627
Added min/max macros for the sized SDL datatypes

Sun, 15 Oct 2017 21:21:19 -0700Fixed bug 3883 - SDL_assert / SDL_PromptAssertion in TTY mode does not accept options ("abriA")
Sam Lantinga <slouken@libsdl.org> [Sun, 15 Oct 2017 21:21:19 -0700] rev 11626
Fixed bug 3883 - SDL_assert / SDL_PromptAssertion in TTY mode does not accept options ("abriA")

shoerbaffen

fgets can read a newline and SDL_strcmp will never return zero.

Sun, 15 Oct 2017 21:07:01 -0700Fixed bug 3882 - cmake fix for osx
Sam Lantinga <slouken@libsdl.org> [Sun, 15 Oct 2017 21:07:01 -0700] rev 11625
Fixed bug 3882 - cmake fix for osx

Ozkan Sezer

In my cross-build environment with cmake-2.8.12.1, cmake does not add
SDL_coreaudio.m to its makefiles and the result is a failure. The fix
is simple: set the language to C for it as it is done at other places
in CMakeLists.txt.