mirror of
https://github.com/yann64/haikuports.git
synced 2026-05-05 06:28:55 +02:00
A cleaner patch for SDL-1.2.13, removing __BEOS__ and !__HAIKU__ cases as those are no longer needed with __BEOS__ no longer being defined in Haiku, plus some other clean ups.
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
diff -urN SDL-1.2.13/README.Haiku SDL-1.2.13-haiku/README.Haiku
|
||||
--- SDL-1.2.13/README.Haiku 1969-12-31 16:00:00.000000000 -0800
|
||||
+++ SDL-1.2.13-haiku/README.Haiku 2008-08-21 07:13:52.000000000 -0700
|
||||
--- SDL-1.2.13/README.Haiku 1970-01-01 00:00:00.000000000 +0000
|
||||
+++ SDL-1.2.13-haiku/README.Haiku 2009-02-15 23:35:54.000000000 +0000
|
||||
@@ -0,0 +1,13 @@
|
||||
+
|
||||
+SDL on Haiku
|
||||
@@ -16,8 +16,8 @@ diff -urN SDL-1.2.13/README.Haiku SDL-1.2.13-haiku/README.Haiku
|
||||
+Enjoy!
|
||||
+ Sam Lantinga (slouken@libsdl.org)
|
||||
diff -urN SDL-1.2.13/configure.in SDL-1.2.13-haiku/configure.in
|
||||
--- SDL-1.2.13/configure.in 2007-12-30 20:48:39.000000000 -0800
|
||||
+++ SDL-1.2.13-haiku/configure.in 2008-08-21 07:34:03.000000000 -0700
|
||||
--- SDL-1.2.13/configure.in 2009-02-15 23:41:29.000000000 +0000
|
||||
+++ SDL-1.2.13-haiku/configure.in 2009-02-15 23:35:54.000000000 +0000
|
||||
@@ -40,7 +40,7 @@
|
||||
AC_SUBST(LT_AGE)
|
||||
|
||||
@@ -37,14 +37,9 @@ diff -urN SDL-1.2.13/configure.in SDL-1.2.13-haiku/configure.in
|
||||
ac_default_prefix=/boot/develop/tools/gnupro
|
||||
CheckDummyVideo
|
||||
diff -urN SDL-1.2.13/include/SDL_platform.h SDL-1.2.13-haiku/include/SDL_platform.h
|
||||
--- SDL-1.2.13/include/SDL_platform.h 2007-12-30 20:48:36.000000000 -0800
|
||||
+++ SDL-1.2.13-haiku/include/SDL_platform.h 2008-08-21 07:15:35.000000000 -0700
|
||||
@@ -29,10 +29,14 @@
|
||||
#undef __AIX__
|
||||
#define __AIX__ 1
|
||||
#endif
|
||||
-#if defined(__BEOS__)
|
||||
+#if defined(__BEOS__) && !defined(__HAIKU__)
|
||||
--- SDL-1.2.13/include/SDL_platform.h 2009-02-15 23:41:29.000000000 +0000
|
||||
+++ SDL-1.2.13-haiku/include/SDL_platform.h 2009-02-15 23:39:24.000000000 +0000
|
||||
@@ -33,6 +33,10 @@
|
||||
#undef __BEOS__
|
||||
#define __BEOS__ 1
|
||||
#endif
|
||||
@@ -56,8 +51,8 @@ diff -urN SDL-1.2.13/include/SDL_platform.h SDL-1.2.13-haiku/include/SDL_platfor
|
||||
#undef __BSDI__
|
||||
#define __BSDI__ 1
|
||||
diff -urN SDL-1.2.13/include/begin_code.h SDL-1.2.13-haiku/include/begin_code.h
|
||||
--- SDL-1.2.13/include/begin_code.h 2007-12-30 20:48:36.000000000 -0800
|
||||
+++ SDL-1.2.13-haiku/include/begin_code.h 2008-08-21 07:15:35.000000000 -0700
|
||||
--- SDL-1.2.13/include/begin_code.h 2009-02-15 23:41:28.000000000 +0000
|
||||
+++ SDL-1.2.13-haiku/include/begin_code.h 2009-02-15 23:35:54.000000000 +0000
|
||||
@@ -33,7 +33,7 @@
|
||||
|
||||
/* Some compilers use a special export keyword */
|
||||
@@ -67,9 +62,27 @@ diff -urN SDL-1.2.13/include/begin_code.h SDL-1.2.13-haiku/include/begin_code.h
|
||||
# if defined(__GNUC__)
|
||||
# define DECLSPEC __declspec(dllexport)
|
||||
# else
|
||||
diff -urN SDL-1.2.13/src/video/bwindow/SDL_sysvideo.cc SDL-1.2.13-haiku/src/video/bwindow/SDL_sysvideo.cc
|
||||
--- SDL-1.2.13/src/video/bwindow/SDL_sysvideo.cc 2009-02-15 23:41:31.000000000 +0000
|
||||
+++ SDL-1.2.13-haiku/src/video/bwindow/SDL_sysvideo.cc 2009-02-15 23:36:16.000000000 +0000
|
||||
@@ -637,8 +637,12 @@
|
||||
int32 cookie = 0;
|
||||
while (get_next_image_info(0,&cookie,&info) == B_OK) {
|
||||
void *location = NULL;
|
||||
- if (get_image_symbol((image_id)cookie,"glBegin",B_SYMBOL_TYPE_ANY,&location) == B_OK) {
|
||||
- _this->gl_config.dll_handle = (void*)cookie;
|
||||
+#ifdef __HAIKU__
|
||||
+ if (get_image_symbol(info.id,"glBegin",B_SYMBOL_TYPE_ANY,&location) == B_OK) { // This is how it actually works in Haiku
|
||||
+#else
|
||||
+ if (get_image_symbol((image_id)cookie,"glBegin",B_SYMBOL_TYPE_ANY,&location) == B_OK) { // I don't know if that *did* work in BeOS
|
||||
+#endif
|
||||
+ _this->gl_config.dll_handle = (void*)info.id;
|
||||
_this->gl_config.driver_loaded = 1;
|
||||
SDL_strlcpy(_this->gl_config.driver_path, "libGL.so", SDL_arraysize(_this->gl_config.driver_path));
|
||||
}
|
||||
diff -urN SDL-1.2.13/test/configure.in SDL-1.2.13-haiku/test/configure.in
|
||||
--- SDL-1.2.13/test/configure.in 2007-12-30 20:48:35.000000000 -0800
|
||||
+++ SDL-1.2.13-haiku/test/configure.in 2008-08-21 07:15:35.000000000 -0700
|
||||
--- SDL-1.2.13/test/configure.in 2009-02-15 23:41:29.000000000 +0000
|
||||
+++ SDL-1.2.13-haiku/test/configure.in 2009-02-15 23:35:54.000000000 +0000
|
||||
@@ -20,7 +20,7 @@
|
||||
MATHLIB=""
|
||||
SYS_GL_LIBS="-lopengl32"
|
||||
@@ -80,18 +93,14 @@ diff -urN SDL-1.2.13/test/configure.in SDL-1.2.13-haiku/test/configure.in
|
||||
MATHLIB=""
|
||||
SYS_GL_LIBS="-lGL"
|
||||
diff -urN SDL-1.2.13/test/testplatform.c SDL-1.2.13-haiku/test/testplatform.c
|
||||
--- SDL-1.2.13/test/testplatform.c 2007-12-30 20:48:35.000000000 -0800
|
||||
+++ SDL-1.2.13-haiku/test/testplatform.c 2008-08-21 07:15:35.000000000 -0700
|
||||
@@ -154,7 +154,11 @@
|
||||
printf("This system is running %s\n",
|
||||
#if __AIX__
|
||||
"AIX"
|
||||
-#elif __BEOS__
|
||||
--- SDL-1.2.13/test/testplatform.c 2009-02-15 23:41:29.000000000 +0000
|
||||
+++ SDL-1.2.13-haiku/test/testplatform.c 2009-02-15 23:48:14.000000000 +0000
|
||||
@@ -162,6 +162,8 @@
|
||||
"Dreamcast"
|
||||
#elif __FREEBSD__
|
||||
"FreeBSD"
|
||||
+#elif __HAIKU__
|
||||
+ "Haiku"
|
||||
+ /* Haiku must appear here before BeOS,
|
||||
+ since it also defines __BEOS__ */
|
||||
+#elif __BEOS__
|
||||
"BeOS"
|
||||
#elif __BSDI__
|
||||
"BSDI"
|
||||
#elif __HPUX__
|
||||
"HP-UX"
|
||||
#elif __IRIX__
|
||||
|
||||
Reference in New Issue
Block a user