Sam Lantinga <slouken@libsdl.org> [Wed, 10 Jul 2013 22:13:19 -0700] rev 7399
Catch out of memory errors creating a window
Sam Lantinga <slouken@libsdl.org> [Wed, 10 Jul 2013 22:06:11 -0700] rev 7398
Fixed compile
Sam Lantinga <slouken@libsdl.org> [Wed, 10 Jul 2013 22:01:24 -0700] rev 7397
Fixed bug 1949 - Pulseaudio 32 bit audio formats support
Matt Scheirer
Pulse has supported (since version 0.8, at least) 32 bit audio formats that are now becoming available in SDL2. This patch adds those format conversions to the switch clause in the pulseaudio backend.
Sam Lantinga <slouken@libsdl.org> [Wed, 10 Jul 2013 21:57:31 -0700] rev 7396
Fixed bug 1953 - Crash at memcpy X11_DispatchEvent(_THIS) Function
Nitz
In Function X11_DispatchEvent(_THIS), case SelectionNotify :
static void
X11_DispatchEvent(_THIS)
{
// Some Code
case SelectionNotify: {
//Some Code
SDL_bool expect_lf = SDL_FALSE;
char *start = NULL; // Initialised with NULL
char *scan = (char*)p.data;
char *fn;
char *uri;
int length = 0;
while (p.count--) {
if (!expect_lf) {
if (*scan==0x0D) {
expect_lf = SDL_TRUE;
} else if(start == NULL) {
start = scan;
length = 0;
}
length++;
} else {
if (*scan==0x0A && length>0) {
uri = malloc(length--);
memcpy(uri, start, length); // Problem is Here, start is still NULL if control comes to else statement without initialising the start pointer, which is wrong
uri[length] = 0;
fn = X11_URIToLocal(uri);
if (fn) SDL_SendDropFile(fn);
free(uri);
}
expect_lf = SDL_FALSE;
start = NULL;
}
scan++;
}
}
As shown above how start pointer remains NULL, Patch for this issue would be:
if (*scan==0x0D) {
expect_lf = SDL_TRUE;
}
if(start == NULL) {
start = scan;
length = 0;
}
Just replace else if statement with if.
Ryan C. Gordon <icculus@icculus.org> [Wed, 10 Jul 2013 23:43:35 -0400] rev 7395
Added src/thread/windows/SDL_systls.c to CMakeLists.txt (thanks, Charles!).
Fixes Bugzilla #1955.
Sam Lantinga <slouken@libsdl.org> [Wed, 10 Jul 2013 20:17:20 -0700] rev 7394
Added PowerPC and ARM versions of the memory barrier functions.
Sam Lantinga <slouken@libsdl.org> [Wed, 10 Jul 2013 18:31:17 -0700] rev 7393
Added release/acquire memory barriers to the atomic API
* Added a destructor to clean up TLS memory at thread shutdown
* Refactored the TLS code to have platform independent code and a small platform dependent core with a fallback to generic code if platform dependent functions fail.
* Fixed recursion issues with SDL_GetErrBuf()
Sam Lantinga <slouken@libsdl.org> [Wed, 10 Jul 2013 02:37:57 -0700] rev 7392
Fixed Haiku build
Sam Lantinga <slouken@libsdl.org> [Wed, 10 Jul 2013 02:32:04 -0700] rev 7391
Implemented an API for thread-local storage: SDL_TLSCreate(), SDL_TLSSet(), SDL_TLSGet()
Jørgen P. Tjernø <jorgen@valvesoftware.com> [Tue, 09 Jul 2013 12:58:54 -0700] rev 7390
SDL_GL_MakeCurrent: Only no-op redundant calls on *same* thread.
This ensures that we only no-op redundant calls if they're made on the
same thread as the last MakeCurrent with those arguments. This should
maek SDL behave better with multithreaded environments.