src/video/SDL_video.c
changeset 910 4ab6d1fd028f
parent 883 50f5a29c6a17
child 916 46916168361d
     1.1 --- a/src/video/SDL_video.c	Sun Jul 18 19:44:06 2004 +0000
     1.2 +++ b/src/video/SDL_video.c	Sun Jul 18 19:46:38 2004 +0000
     1.3 @@ -564,6 +564,10 @@
     1.4  	return;
     1.5  }
     1.6  
     1.7 +#ifdef __QNXNTO__
     1.8 +    #include <sys/neutrino.h>
     1.9 +#endif /* __QNXNTO__ */
    1.10 +
    1.11  /*
    1.12   * Set the requested video mode, allocating a shadow buffer if necessary.
    1.13   */
    1.14 @@ -738,22 +742,31 @@
    1.15  #ifdef HAVE_OPENGL
    1.16  	/* Load GL symbols (before MakeCurrent, where we need glGetString). */
    1.17  	if ( flags & (SDL_OPENGL | SDL_OPENGLBLIT) ) {
    1.18 -#ifndef __QNXNTO__
    1.19 -#define SDL_PROC(ret,func,params) \
    1.20 -do { \
    1.21 -	video->func = SDL_GL_GetProcAddress(#func); \
    1.22 -	if ( ! video->func ) { \
    1.23 -		SDL_SetError("Couldn't load GL function: %s\n", #func); \
    1.24 -		return(NULL); \
    1.25 -	} \
    1.26 -} while ( 0 );
    1.27 +
    1.28 +#ifdef __QNXNTO__
    1.29 +    #if (_NTO_VERSION < 630)
    1.30 +       #define __SDL_NOGETPROCADDR__
    1.31 +    #endif /* 6.3.0 */
    1.32 +#endif /* __QNXNTO__ */
    1.33 +
    1.34 +#ifdef __SDL_NOGETPROCADDR__
    1.35 +    #define SDL_PROC(ret,func,params) video->func=func;
    1.36  #else
    1.37 -#define SDL_PROC(ret,func,params) video->func=func;
    1.38 -#endif /* __QNXNTO__ */
    1.39 +    #define SDL_PROC(ret,func,params) \
    1.40 +    do { \
    1.41 +        video->func = SDL_GL_GetProcAddress(#func); \
    1.42 +        if ( ! video->func ) { \
    1.43 +            SDL_SetError("Couldn't load GL function: %s\n", #func); \
    1.44 +        return(NULL); \
    1.45 +        } \
    1.46 +    } while ( 0 );
    1.47 +
    1.48 +#endif /* __SDL_NOGETPROCADDR__ */
    1.49 +
    1.50  #include "SDL_glfuncs.h"
    1.51  #undef SDL_PROC	
    1.52  	}
    1.53 -#endif
    1.54 +#endif /* HAVE_OPENGL */
    1.55  
    1.56  	/* If we're running OpenGL, make the context current */
    1.57  	if ( (video->screen->flags & SDL_OPENGL) &&