src/video/bwindow/SDL_sysvideo.cc
branchSDL-1.2
changeset 4164 7a4c511c980a
parent 4159 a1b03ba2fcd0
child 4287 0620847bf1a8
     1.1 --- a/src/video/bwindow/SDL_sysvideo.cc	Tue Feb 17 05:25:25 2009 +0000
     1.2 +++ b/src/video/bwindow/SDL_sysvideo.cc	Tue Mar 17 03:58:53 2009 +0000
     1.3 @@ -57,7 +57,7 @@
     1.4  static void BE_FreeHWSurface(_THIS, SDL_Surface *surface);
     1.5  
     1.6  static int BE_ToggleFullScreen(_THIS, int fullscreen);
     1.7 -static SDL_Overlay *BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface *display);
     1.8 +SDL_Overlay *BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface *display);
     1.9  
    1.10  /* OpenGL functions */
    1.11  #if SDL_VIDEO_OPENGL
    1.12 @@ -637,8 +637,12 @@
    1.13  			int32 cookie = 0;
    1.14  			while (get_next_image_info(0,&cookie,&info) == B_OK) {
    1.15  				void *location = NULL;
    1.16 -				if (get_image_symbol((image_id)cookie,"glBegin",B_SYMBOL_TYPE_ANY,&location) == B_OK) {
    1.17 -					_this->gl_config.dll_handle = (void*)cookie;
    1.18 +#ifdef __HAIKU__
    1.19 +				if (get_image_symbol(info.id,"glBegin",B_SYMBOL_TYPE_ANY,&location) == B_OK) { // This is how it actually works in Haiku
    1.20 +#else
    1.21 +				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
    1.22 +#endif
    1.23 +					_this->gl_config.dll_handle = (void*)info.id;
    1.24  					_this->gl_config.driver_loaded = 1;
    1.25  					SDL_strlcpy(_this->gl_config.driver_path, "libGL.so", SDL_arraysize(_this->gl_config.driver_path));
    1.26  				}