 +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)
  

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
@@ -0,0 +1,13 @@
+
+SDL on Haiku

 #  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	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"
