Skip to content

Commit b0e281d

Browse files
committed
MACOSXPPC: Follow upstream dockerized-bb's update for SDL1.2, minus one OSXPPC PR
I avoided updating the SDL1.2 snapshots until now, because of the libsdl-org/SDL-1.2#871 changes I don't trust much (they just look untested). Now I think it's time to sync our SDL1.2 snapshot again, but I've chosen to revert this PR. It just looks like it reinstates code that was disabled for years and years, and it looks like it only affected OSX 10.3 and below, for which we don't care. Maybe there's something good to be picked up in this PR, but for now I'm not aware of a major issue regarding SDL1.2, and I've spent enough time trying to understand what this old code does. My findings were added to the top of this patch. SDL1.2 remains built with /usr/bin/gcc-4.0 because of its reliance on the Apple-only behavior of the -faltivec flag (otherwise, we either loose Altivec acceleration code, or G3 compatibility).
1 parent 99375af commit b0e281d

File tree

2 files changed

+55
-4
lines changed

2 files changed

+55
-4
lines changed

toolchains/macosx-ppc/packages/libsdl1.2/build.sh

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
#! /bin/sh
22

3-
# note: avoiding later 7a877568f9250a1f6e2b77551878c06ce2f639bf on purpose
4-
# because that Darwin PPC change restored 10.3 and older "worse" APIs, and
5-
# more importantly that change has been merged without any test...
6-
SDL_VERSION=d95c1a4bbd644baba748d341b03141e5f0481ae6
3+
SDL_VERSION=0237f339e6bec39c56e1364787fabdb0245d478f
74

85
PACKAGE_DIR=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
96
HELPERS_DIR=$PACKAGE_DIR/../../../common
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
Someone recently added back some old OSX API calls to SDL1.2 on PPC:
2+
https://github.com/libsdl-org/SDL-1.2/pull/871
3+
4+
Indeed, the original code checked for preprocessor values which don't
5+
exist on OSX PPC, and so it was never enabled.
6+
7+
But it's been this way for years on OSX PPC, and nobody complained.
8+
Moreover, it looks like the older OSX API calls may have only been
9+
useful on pre-10.3 systems, which we don't support.
10+
11+
Since the original PR writer doesn't appear to have tested these
12+
changes on OSX PPC, I prefer reverting to the previous SDL1.2
13+
behavior, which was effective in many official ScummVM build for
14+
OSX PPC without any reported issue.
15+
16+
For more context:
17+
18+
http://forums.libsdl.org/viewtopic.php?p=29802
19+
https://github.com/libsdl-org/SDL-1.2/commit/7a877568f9250a1f6e2b77551878c06ce2f639bf
20+
https://github.com/libsdl-org/SDL-1.2/commit/ad8e59d08b892f00e856ca0b793f4dbc7481df65
21+
22+
--- a/src/video/quartz/SDL_QuartzGL.m
23+
+++ b/src/video/quartz/SDL_QuartzGL.m
24+
@@ -41,7 +41,7 @@
25+
#define NSOpenGLPFASamples ((NSOpenGLPixelFormatAttribute) 56)
26+
#endif
27+
28+
-#ifdef __POWERPC__ /* we lost this in 10.7, which has no PPC support. */
29+
+#if 0 /* we lost this in 10.6. */
30+
@implementation NSOpenGLContext (CGLContextAccess)
31+
- (CGLContextObj) cglContext;
32+
{
33+
--- a/src/video/quartz/SDL_QuartzVideo.h
34+
+++ b/src/video/quartz/SDL_QuartzVideo.h
35+
@@ -68,7 +68,7 @@
36+
#include "../../events/SDL_events_c.h"
37+
38+
39+
-#ifdef __POWERPC__
40+
+#if 0
41+
/*
42+
This is a workaround to directly access NSOpenGLContext's CGL context
43+
We need this to check for errors NSOpenGLContext doesn't support
44+
--- a/src/video/quartz/SDL_QuartzVideo.m
45+
+++ b/src/video/quartz/SDL_QuartzVideo.m
46+
@@ -586,7 +586,7 @@
47+
QZ_TearDownOpenGL (this);
48+
}
49+
50+
- #ifdef __ppc__ /* we only use this for pre-10.3 compatibility. */
51+
+ #if 0 /* we only use this for pre-10.3 compatibility. */
52+
CGLSetFullScreen (NULL);
53+
#endif
54+
}

0 commit comments

Comments
 (0)