Thu, 19 Feb 2009 04:03:05 +0000Added missing files
Sam Lantinga <slouken@libsdl.org> [Thu, 19 Feb 2009 04:03:05 +0000] rev 3074
Added missing files

Wed, 18 Feb 2009 00:33:31 +0000NDS compiles again, but may not yet work. Sprite support has been removed for the time being while it is re-worked.
Darren Alton <dalton@stevens.edu> [Wed, 18 Feb 2009 00:33:31 +0000] rev 3073
NDS compiles again, but may not yet work. Sprite support has been removed for the time being while it is re-worked.

Tue, 17 Feb 2009 05:59:40 +0000Fixed bug #684
Sam Lantinga <slouken@libsdl.org> [Tue, 17 Feb 2009 05:59:40 +0000] rev 3072
Fixed bug #684

Reworked Pierre's patch a little bit, which added SDL_WaitEventTimeout()

Tue, 17 Feb 2009 05:57:54 +0000indent
Sam Lantinga <slouken@libsdl.org> [Tue, 17 Feb 2009 05:57:54 +0000] rev 3071
indent

Tue, 17 Feb 2009 05:44:49 +0000Fixed bug #681
Sam Lantinga <slouken@libsdl.org> [Tue, 17 Feb 2009 05:44:49 +0000] rev 3070
Fixed bug #681

Description From Philipp 2009-01-16 20:50:01 (-) [reply]

The File test/README from the svn says this:

testgl A very simple example of using OpenGL with SDL
testgl2 Improved version of testgl

It is actually exchanged.

testgl.c is the improved version right now and testgl2.c the simple one.

Tue, 17 Feb 2009 05:39:18 +0000Date: Thu, 27 Dec 2007 07:38:25 +0000
Sam Lantinga <slouken@libsdl.org> [Tue, 17 Feb 2009 05:39:18 +0000] rev 3069
Date: Thu, 27 Dec 2007 07:38:25 +0000
From: John Bartholomew
Subject: [SDL] SDL Semaphore implementation broken on Windows?
Hi,

Over the past couple of days, I've been battling with SDL, SDL_Mixer and SMPEG to try to find an audio hang bug. I believe I've found the problem, which I think is a race condition inside SDL's semaphore implementation (at least the Windows implementation). The semaphore code uses Windows' built in semaphore functions, but it also maintains a separate count value. This count value is updated with bare increment and decrement operations in SemPost and SemWaitTimeout - no locking primitives to protect them.

In tracking down the apparent audio bug, I found that at some point a semaphore's count value was being decremented to -1, which is clearly not a valid value for it to take.

I'm still not certain exactly what sequence of operations is occuring for this to happen, but I believe that overall it's a race condition between a thread calling SemPost (which increments the count) and the thread on the other end calling SemWait (which decrements it).

I will try to make a test case to verify this, but I'm not sure if I'll be able to (threading errors being difficult to reproduce even in the best circumstances).

However, assuming this is the cause of my problems, there is a very
simple fix:
Windows provides InterlockedIncrement() and InterlockedDecrement()
functions to perform increments and decrements which are guaranteed to be atomic. So the fix is in thread/win32/SDL_syssem.c: replace occurrences of --sem->count with InterlockedDecrement(&sem->count); and replace occurrences of ++sem->count with InterlockedIncrement(&sem->count);

This is using SDL v1.2.12, built with VC++ 2008 Express, running on a
Core 2 duo processor.

Tue, 17 Feb 2009 05:17:51 +0000Fixed bug #633
Sam Lantinga <slouken@libsdl.org> [Tue, 17 Feb 2009 05:17:51 +0000] rev 3068
Fixed bug #633

Description From Michael Stone 2008-09-25 19:27:29 (-) [reply]

To determine whether a pid is occupied with the kill(pid, 0) idiom, you have to
test

#include <signal.h>
#include <errno.h>
kill(pid, 0) < 0 && errno == ESRCH

not just

#include <signal.h>
kill(pid, 0) < 0

otherwise you get incorrect results when pid is running as a different user
(causing kill(pid, 0) to return -1 + EPERM).

src/audio/alsa/SDL_alsa_audio.c is certainly affected by this bug in both
1.2.13 and 1.3-trunk. It probably occurs in other places as well.

Tue, 17 Feb 2009 04:57:39 +0000Fixed bug #537
Sam Lantinga <slouken@libsdl.org> [Tue, 17 Feb 2009 04:57:39 +0000] rev 3067
Fixed bug #537

Description From esigra 2008-01-07 16:20:21 (-) [reply]

I try to get a clean compile for a project using SDL. But I get warnings
from SDL headers when I use -Wold-style-cast. This is especially bad
because I plan to build the software with -Werror=old-style-cast when we
have switched over to GCC 4.2, which has that option.

But this problem can be fixed in the SDL headers. I checked out the SVN
version and made some patches. See the attached patch.

Sun, 15 Feb 2009 06:12:52 +0000Fixed destination of XCopyArea()
Sam Lantinga <slouken@libsdl.org> [Sun, 15 Feb 2009 06:12:52 +0000] rev 3066
Fixed destination of XCopyArea()

Sat, 14 Feb 2009 15:56:26 +0000Added reminder for shaped windows
Sam Lantinga <slouken@libsdl.org> [Sat, 14 Feb 2009 15:56:26 +0000] rev 3065
Added reminder for shaped windows