Sun, 30 Jan 2011 13:42:05 -0800Fixed bug #1111
Sam Lantinga [Sun, 30 Jan 2011 13:42:05 -0800] rev 5128
Fixed bug #1111

kwm@rainbow-runner.nl 2011-01-30 06:28:27 PST

Created attachment 562 [details]
Build fix with clang.

When building sdl 1.2.14 with the Clang compiler http://clang.llvm.org .
The build fails in src/video/mmx.h with the following error:

--------------------------------------------------
./src/video/SDL_RLEaccel.c:831:5: error: invalid operand for instruction
CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
^
./src/video/SDL_RLEaccel.c:831:17: note: instantiated from:
CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
^
./src/video/SDL_RLEaccel.c:831:5: note: instantiated from:
CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
^
./src/video/SDL_RLEaccel.c:647:23: note: instantiated from:
blitter(2, Uint8, ALPHA_BLIT16_565MMX); \
^
./src/video/SDL_RLEaccel.c:282:4: note: instantiated from:
movq_r2m(mm3, *dstp); \
^
In file included from ./src/video/SDL_RLEaccel.c:99:
./src/video/mmx.h:379:28: note: instantiated from:
#define movq_r2m(reg, var) mmx_r2m(movq, reg, var)
^
<scratch space>:192:1: note: instantiated from:
"movq"
^
<inline asm>:1:2: note: instantiated into assembly here
movq %mm3, %dx
^
--------------------------------------------------

According to the clang developers this is a invalid inline assembly.
Using the attached patch from the last commit in the below bug report fixes the
compile.
More details from: http://llvm.org/bugs/show_bug.cgi?id=6730

Sun, 30 Jan 2011 13:38:57 -0800Fixed bug #1111 SDL-1.2
Sam Lantinga [Sun, 30 Jan 2011 13:38:57 -0800] rev 5127
Fixed bug #1111

kwm@rainbow-runner.nl 2011-01-30 06:28:27 PST

When building sdl 1.2.14 with the Clang compiler http://clang.llvm.org .
The build fails in src/video/mmx.h with the following error:

--------------------------------------------------
./src/video/SDL_RLEaccel.c:831:5: error: invalid operand for instruction
CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
^
./src/video/SDL_RLEaccel.c:831:17: note: instantiated from:
CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
^
./src/video/SDL_RLEaccel.c:831:5: note: instantiated from:
CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
^
./src/video/SDL_RLEaccel.c:647:23: note: instantiated from:
blitter(2, Uint8, ALPHA_BLIT16_565MMX); \
^
./src/video/SDL_RLEaccel.c:282:4: note: instantiated from:
movq_r2m(mm3, *dstp); \
^
In file included from ./src/video/SDL_RLEaccel.c:99:
./src/video/mmx.h:379:28: note: instantiated from:
#define movq_r2m(reg, var) mmx_r2m(movq, reg, var)
^
<scratch space>:192:1: note: instantiated from:
"movq"
^
<inline asm>:1:2: note: instantiated into assembly here
movq %mm3, %dx
^
--------------------------------------------------

According to the clang developers this is a invalid inline assembly.
Using the attached patch from the last commit in the below bug report fixes the
compile.
More details from: http://llvm.org/bugs/show_bug.cgi?id=6730

Fri, 28 Jan 2011 12:09:25 -0800Added Edgar's blog to the haptic documentation
Sam Lantinga [Fri, 28 Jan 2011 12:09:25 -0800] rev 5126
Added Edgar's blog to the haptic documentation

Fri, 28 Jan 2011 10:37:36 -0800Updated main.c for API changes
Sam Lantinga [Fri, 28 Jan 2011 10:37:36 -0800] rev 5125
Updated main.c for API changes

Kees Bakker to sdl

The main.c for the template is still targeting SDL1.2. Here
is the patch to make it work for SDL1.3 (I'm hoping
the mailing lists accepts attachments.)

In this patch I have also changed the shell script that
assembles the Template. Since there is now only one lib
target (same name for "device" and "simulator" version)
I copy the simulator library to the destination with
the name libSDLSimulator.a. This is not a satisfactory
solution, because both libraries are included in the project
while only one is needed (depending on the selected
environment). However, I'm not fluent with Xcode to
say what a better solution would be.

Kind regards,
Kees Bakker

Fri, 28 Jan 2011 10:21:58 -0800Fixed bug #1056 (Frequent crashes in Touch events by simply touching the screen)
Sam Lantinga [Fri, 28 Jan 2011 10:21:58 -0800] rev 5124
Fixed bug #1056 (Frequent crashes in Touch events by simply touching the screen)

Joseba GarcĂ­a Echebarria 2010-12-15 01:55:22 PST

I believe the crash is caused by a check not being performed on wether an
SDL_Touch element is NULL before using it in the SDL_SendTouchMotion function
in src/events/SDL_touch.c around line 400.
Judging from the rest of the code, there's a missing

if (!touch) {
return 0;
}

before using "touch" as SDL_GetFinger(), SDL_GetFingerIndexId() use
touch->num_fingers without checking.

I can attach a patch if you like. It seems pretty straightforward, though.

I have yet to discover why touch is being returned as NULL as this error is
only triggered when an actual gesture has been performed, maybe something
related to SDL_AddTouch()?

Thu, 27 Jan 2011 22:44:08 -0800Removed completely non-portable event thread hack.
Sam Lantinga [Thu, 27 Jan 2011 22:44:08 -0800] rev 5123
Removed completely non-portable event thread hack.
Next I'll be working on generalizing the event sources and making the event queue lock-free. :)

Thu, 27 Jan 2011 20:51:54 -0800Fixed test
Sam Lantinga [Thu, 27 Jan 2011 20:51:54 -0800] rev 5122
Fixed test

Thu, 27 Jan 2011 20:49:07 -0800Added CPU cache line size to the test output.
Sam Lantinga [Thu, 27 Jan 2011 20:49:07 -0800] rev 5121
Added CPU cache line size to the test output.

Thu, 27 Jan 2011 20:46:45 -0800Added API function to get CPU cache line size.
Sam Lantinga [Thu, 27 Jan 2011 20:46:45 -0800] rev 5120
Added API function to get CPU cache line size.

Thu, 27 Jan 2011 20:37:54 -0800Fixed quotes around Mercurial revision text
Sam Lantinga [Thu, 27 Jan 2011 20:37:54 -0800] rev 5119
Fixed quotes around Mercurial revision text