Mon, 20 Feb 2012 20:55:23 -0500Fixed bug 1424 - Handling of alpha channel in Altivec accelerated blit functions SDL-1.2
Sam Lantinga <slouken@libsdl.org> [Mon, 20 Feb 2012 20:55:23 -0500] rev 6294
Fixed bug 1424 - Handling of alpha channel in Altivec accelerated blit functions

evilbite 2012-02-19 09:38:21 PST

There is only one Altivec accelerated blit function
(ConvertAltivec32to32_prefetch() or ConvertAltivec32to32_noprefetch(),
depending on the CPU used) that is supposed to handle all alpha combinations.
This works as follows for every pixel line:
1. Blit single pixels until an aligned address is reached
2. Accelerated blit as far as possible
3. Blit single remaining pixels
Part 2. is set up correctly to handle different combinations of the alpha
channels of the participating surfaces. Parts 1. and 3. only do a simple copy
of all the pixel's components from souce to destination. But when the source
surface has no alpha channel (Amask is 0, e.g. the video surface) the surface's
alpha value must be used instead. Otherwise crap (uninitialized data) is being
copied to the destiniation's alpha channel.

The attached patch is a quick'n'dirty solution to the problem. A more
sophisticated solution might require separate functions for different
combinations of the alpha channels of the participating surfaces.

Mon, 20 Feb 2012 20:50:38 -0500Fixed bug 1427 - integer passed to XChangeProperty() causes crash SDL-1.2
Sam Lantinga <slouken@libsdl.org> [Mon, 20 Feb 2012 20:50:38 -0500] rev 6293
Fixed bug 1427 - integer passed to XChangeProperty() causes crash

Julian Coleman 2012-02-20 06:51:12 PST

In src/video/x11/SDL_x11video.c, the result of getpid(), i.e., a pid_t is
passed to:

XChangeProperty(..., 32, ...)

However, using 32 here means that Xlib treats the value as a long, and pid_t is
an int. So, we get a bus error inside Xlib.
The fix is to make sure that anything passed to XChangeProperty() is aligned
correctly. Note, that the other calls to XChangeProperty() pass long values
here.
The proposed patch makes a union of the pid_t return type from getpid() and a
dummy long. This has been tested to fix the bus error crash on NetBSD/sparc64.

Mon, 20 Feb 2012 20:46:30 -0500Fix for double free when quitting on iOS
Sam Lantinga <slouken@libsdl.org> [Mon, 20 Feb 2012 20:46:30 -0500] rev 6292
Fix for double free when quitting on iOS

Tim Angus 2012-02-20 09:40:35 PST

As alluded to in the email thread "SDL2 error on iOS (doublefree)", I believe
the original cause of this bug is confusion over the purpose of
SDL_VideoDisplay::current_mode. It looks as though it is a weak reference to
another mode, albeit with value semantics. The iOS port treated it as a strong
reference however and claimed ownership, which is why things blew up. All the
patch really does it to stop treating current_mode as a strong reference.

To prevent this happening again it might be an idea to change current_mode to
be a pointer type rather than a value. This would certainly make its semantics
much more obvious. Failing that, a comment in the struct indicating its weak
reference properties might be wise.

Wed, 15 Feb 2012 21:11:21 -0500Fixed bug 1419 - SDL_libgl2D.c breaks ndk-build
Sam Lantinga <slouken@libsdl.org> [Wed, 15 Feb 2012 21:11:21 -0500] rev 6291
Fixed bug 1419 - SDL_libgl2D.c breaks ndk-build

Philip Taylor 2012-02-15 10:43:47 PST

render/nds/SDL_libgl2D.c unconditionally includes NDS-only code. SDL's
Android.mk compiles source files matching

$(wildcard $(LOCAL_PATH)/src/render/*/*.c)

which includes that file, causing build errors when running ndk-build.

Wed, 15 Feb 2012 21:06:45 -0500FreeBSD compile fix
Sam Lantinga <slouken@libsdl.org> [Wed, 15 Feb 2012 21:06:45 -0500] rev 6290
FreeBSD compile fix

Robert Millan

src/joystick/bsd/SDL_sysjoystick.c makes the invalid assumption that
__FreeBSD_kernel__ implies presence of "ucr_data" struct member. This
breaks recent versions of FreeBSD 10-CURRENT, FreeBSD 9-STABLE and
Debian GNU/kFreeBSD "wheezy/sid".

Wed, 15 Feb 2012 21:06:08 -0500FreeBSD compile fix SDL-1.2
Sam Lantinga <slouken@libsdl.org> [Wed, 15 Feb 2012 21:06:08 -0500] rev 6289
FreeBSD compile fix

Robert Millan

src/joystick/bsd/SDL_sysjoystick.c makes the invalid assumption that
__FreeBSD_kernel__ implies presence of "ucr_data" struct member. This
breaks recent versions of FreeBSD 10-CURRENT, FreeBSD 9-STABLE and
Debian GNU/kFreeBSD "wheezy/sid".

Tue, 14 Feb 2012 20:54:44 -0500Quick android Makefile fix from Gabriel Jacobo
Sam Lantinga <slouken@libsdl.org> [Tue, 14 Feb 2012 20:54:44 -0500] rev 6288
Quick android Makefile fix from Gabriel Jacobo

Sun, 12 Feb 2012 23:22:44 -0500Missed a file in Frank's patch
Sam Lantinga <slouken@libsdl.org> [Sun, 12 Feb 2012 23:22:44 -0500] rev 6287
Missed a file in Frank's patch

Sun, 12 Feb 2012 21:05:24 -0500Updated the .hgignore for the current set of test programs
Sam Lantinga <slouken@libsdl.org> [Sun, 12 Feb 2012 21:05:24 -0500] rev 6286
Updated the .hgignore for the current set of test programs

Sun, 12 Feb 2012 21:04:01 -0500Updated Nintendo DS support
Sam Lantinga <slouken@libsdl.org> [Sun, 12 Feb 2012 21:04:01 -0500] rev 6285
Updated Nintendo DS support

Frank Zago

This patch updates the DS port:
- do not use the now removed compat layer.
- integrate parts of libgl2D since I got permission from the author, and thus
removed an external dependancy,
- a few bugs fixes.

Now, the textures should be completely supported, except reading from them
which doesn't makes sense to have on the DS. Sound is still not supported.

If someone else wants to work on the missing pieces, feel free.