Date: Sun, 25 Jul 2004 23:10:03 +0800
authorSam Lantinga <slouken@libsdl.org>
Sun, 25 Jul 2004 19:43:56 +0000
changeset 91646916168361d
parent 915 01cddd0f2efb
child 917 24852aeb0657
Date: Sun, 25 Jul 2004 23:10:03 +0800
From: Chris Taylor
Subject: SDL for Macintosh Programmer's Workshop: removed dynamic loading

I'm working on a game called D2X which uses SDL, and I recently ported
it to Mac OS 9. I used MPW to build it. It uses OpenGL. To get it to
work, I had to build SDL so it doesn't dynamically load OpenGL. This is
because I don't think MPW supports dynamic loading. The following patch
makes sure when SDL is built under MPW, dynamic loading of shared
libraries is disabled.
src/video/SDL_video.c
src/video/macrom/SDL_romvideo.c
     1.1 --- a/src/video/SDL_video.c	Sun Jul 25 18:43:07 2004 +0000
     1.2 +++ b/src/video/SDL_video.c	Sun Jul 25 19:43:56 2004 +0000
     1.3 @@ -743,12 +743,11 @@
     1.4  	/* Load GL symbols (before MakeCurrent, where we need glGetString). */
     1.5  	if ( flags & (SDL_OPENGL | SDL_OPENGLBLIT) ) {
     1.6  
     1.7 -#ifdef __QNXNTO__
     1.8 -    #if (_NTO_VERSION < 630)
     1.9 -       #define __SDL_NOGETPROCADDR__
    1.10 -    #endif /* 6.3.0 */
    1.11 -#endif /* __QNXNTO__ */
    1.12 -
    1.13 +#if (defined(macintosh) && !defined(__MWERKS__))
    1.14 +#define __SDL_NOGETPROCADDR__
    1.15 +#elif defined(__QNXNTO__) && (_NTO_VERSION < 630)
    1.16 +#define __SDL_NOGETPROCADDR__
    1.17 +#endif
    1.18  #ifdef __SDL_NOGETPROCADDR__
    1.19      #define SDL_PROC(ret,func,params) video->func=func;
    1.20  #else
     2.1 --- a/src/video/macrom/SDL_romvideo.c	Sun Jul 25 18:43:07 2004 +0000
     2.2 +++ b/src/video/macrom/SDL_romvideo.c	Sun Jul 25 19:43:56 2004 +0000
     2.3 @@ -163,9 +163,14 @@
     2.4  #ifdef HAVE_OPENGL
     2.5  	device->GL_MakeCurrent = Mac_GL_MakeCurrent;
     2.6  	device->GL_SwapBuffers = Mac_GL_SwapBuffers;
     2.7 +#ifdef __MWERKS__
     2.8  	device->GL_LoadLibrary = Mac_GL_LoadLibrary;
     2.9  	device->GL_GetProcAddress = Mac_GL_GetProcAddress;
    2.10 -#endif
    2.11 +#else
    2.12 +	device->GL_LoadLibrary = NULL;
    2.13 +	device->GL_GetProcAddress = NULL;
    2.14 +#endif	// CodeWarrior
    2.15 +#endif	// Have OpenGL
    2.16  	device->SetCaption = Mac_SetCaption;
    2.17  	device->SetIcon = NULL;
    2.18  	device->IconifyWindow = NULL;