src/video/bwindow/SDL_sysvideo.cc
branchSDL-1.2
changeset 4164 7a4c511c980a
parent 4159 a1b03ba2fcd0
child 4287 0620847bf1a8
equal deleted inserted replaced
4163:bec67d0b6645 4164:7a4c511c980a
    55 static int BE_LockHWSurface(_THIS, SDL_Surface *surface);
    55 static int BE_LockHWSurface(_THIS, SDL_Surface *surface);
    56 static void BE_UnlockHWSurface(_THIS, SDL_Surface *surface);
    56 static void BE_UnlockHWSurface(_THIS, SDL_Surface *surface);
    57 static void BE_FreeHWSurface(_THIS, SDL_Surface *surface);
    57 static void BE_FreeHWSurface(_THIS, SDL_Surface *surface);
    58 
    58 
    59 static int BE_ToggleFullScreen(_THIS, int fullscreen);
    59 static int BE_ToggleFullScreen(_THIS, int fullscreen);
    60 static SDL_Overlay *BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface *display);
    60 SDL_Overlay *BE_CreateYUVOverlay(_THIS, int width, int height, Uint32 format, SDL_Surface *display);
    61 
    61 
    62 /* OpenGL functions */
    62 /* OpenGL functions */
    63 #if SDL_VIDEO_OPENGL
    63 #if SDL_VIDEO_OPENGL
    64 static int BE_GL_LoadLibrary(_THIS, const char *path);
    64 static int BE_GL_LoadLibrary(_THIS, const char *path);
    65 static void* BE_GL_GetProcAddress(_THIS, const char *proc);
    65 static void* BE_GL_GetProcAddress(_THIS, const char *proc);
   635 		if (_this->gl_config.dll_handle == NULL) {
   635 		if (_this->gl_config.dll_handle == NULL) {
   636 			image_info info;
   636 			image_info info;
   637 			int32 cookie = 0;
   637 			int32 cookie = 0;
   638 			while (get_next_image_info(0,&cookie,&info) == B_OK) {
   638 			while (get_next_image_info(0,&cookie,&info) == B_OK) {
   639 				void *location = NULL;
   639 				void *location = NULL;
   640 				if (get_image_symbol((image_id)cookie,"glBegin",B_SYMBOL_TYPE_ANY,&location) == B_OK) {
   640 #ifdef __HAIKU__
   641 					_this->gl_config.dll_handle = (void*)cookie;
   641 				if (get_image_symbol(info.id,"glBegin",B_SYMBOL_TYPE_ANY,&location) == B_OK) { // This is how it actually works in Haiku
       
   642 #else
       
   643 				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
       
   644 #endif
       
   645 					_this->gl_config.dll_handle = (void*)info.id;
   642 					_this->gl_config.driver_loaded = 1;
   646 					_this->gl_config.driver_loaded = 1;
   643 					SDL_strlcpy(_this->gl_config.driver_path, "libGL.so", SDL_arraysize(_this->gl_config.driver_path));
   647 					SDL_strlcpy(_this->gl_config.driver_path, "libGL.so", SDL_arraysize(_this->gl_config.driver_path));
   644 				}
   648 				}
   645 			}
   649 			}
   646 		}
   650 		}