Mercurial > sdl-ios-xcode
annotate src/main/macos/exports/gendef.pl @ 1544:ab1e4c41ab71
Fixed bug #33
Mike Frysinger wrote:
> with libsdl-1.2.9, some games (like bomberclone) started
> segfaulting in Gentoo
[...snip...]
> the last change in the last hunk:
[...snip...]
> if i change the statement to read:
> (table[which].blit_features & GetBlitFeatures()) == GetBlitFeatures()
> bomberclone no longer segfaults on my box
Alex Volkov wrote:
> The test "(table[which].blit_features & GetBlitFeatures()) ==
> table[which].blit_features)" is correct, and the previous
> "(table[which].cpu_mmx == SDL_HasMMX())" was actually broken.
I think there is potentially a slightly different cause of the above problem.
During the introduction of the Altivec code, the blit_table struct field
'alpha' got changed from a straightforward enum to a bitmask, which makes
perfect sense by itself. However, now the table driven blitter selection code
in SDL_CalculateBlitN() can choose the wrong blitters when searching for a
NO_ALPHA blitter because of the following code:
int a_need = 0;
...
(a_need & table[which].alpha) == a_need &&
When searching through the normal_blit_2[] table, a SET_ALPHA blitter (like
Blit_RGB565_ARGB8888) can now be selected instead of a NO_ALPHA one, causing
alpha channel bits to appear in a non-alpha destination surface. I suppose this
could theoretically be an indirect cause of the segfault mentioned above.
I *think* this can be fixed by changing to
int a_need = NO_ALPHA;
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Wed, 15 Mar 2006 15:47:49 +0000 |
parents | 84cecd0b64b4 |
children | da1ef6acde9e |
rev | line source |
---|---|
0 | 1 #!/usr/bin/perl |
2 # | |
3 # Program to take a set of header files and generate DLL export definitions | |
4 | |
1317 | 5 # Special exports to ignore for this platform |
6 | |
0 | 7 while ( ($file = shift(@ARGV)) ) { |
8 if ( ! defined(open(FILE, $file)) ) { | |
9 warn "Couldn't open $file: $!\n"; | |
10 next; | |
11 } | |
12 $printed_header = 0; | |
13 $file =~ s,.*/,,; | |
14 while (<FILE>) { | |
930
02759105b989
Date: Fri, 20 Aug 2004 08:31:20 +0200
Sam Lantinga <slouken@libsdl.org>
parents:
345
diff
changeset
|
15 if ( / DECLSPEC.* SDLCALL ([^\s\(]+)/ ) { |
1317 | 16 if ( not $exclude{$1} ) { |
17 print "\t$1\n"; | |
18 } | |
0 | 19 } |
20 } | |
21 close(FILE); | |
22 } | |
1317 | 23 |
24 # Special exports to include for this platform | |
1424
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
25 print "\tSDL_putenv\n"; |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
26 print "\tSDL_getenv\n"; |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
27 print "\tSDL_qsort\n"; |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
28 print "\tSDL_revcpy\n"; |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
29 print "\tSDL_strlcpy\n"; |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
30 print "\tSDL_strlcat\n"; |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
31 print "\tSDL_strdup\n"; |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
32 print "\tSDL_strrev\n"; |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
33 print "\tSDL_strupr\n"; |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
34 print "\tSDL_strlwr\n"; |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
35 print "\tSDL_ltoa\n"; |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
36 print "\tSDL_ultoa\n"; |
1516
4d241ea8a1cd
Updated MacOS Classic build
Sam Lantinga <slouken@libsdl.org>
parents:
1427
diff
changeset
|
37 print "\tSDL_strcasecmp\n"; |
4d241ea8a1cd
Updated MacOS Classic build
Sam Lantinga <slouken@libsdl.org>
parents:
1427
diff
changeset
|
38 print "\tSDL_strncasecmp\n"; |
1424
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
39 print "\tSDL_snprintf\n"; |
7a610f25c12f
Updated MacOS Classic MPW build
Sam Lantinga <slouken@libsdl.org>
parents:
1317
diff
changeset
|
40 print "\tSDL_vsnprintf\n"; |
1529
84cecd0b64b4
Updated MacOS Classic and MacOS X exports list
Sam Lantinga <slouken@libsdl.org>
parents:
1516
diff
changeset
|
41 print "\tSDL_iconv\n"; |
1516
4d241ea8a1cd
Updated MacOS Classic build
Sam Lantinga <slouken@libsdl.org>
parents:
1427
diff
changeset
|
42 print "\tSDL_iconv_string\n"; |
0 | 43 print "\tSDL_InitQuickDraw\n"; |