Skip to content

Commit

Permalink
Date: Sun, 25 Jul 2004 23:10:03 +0800
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
slouken committed Jul 25, 2004
1 parent 0b9b653 commit 54fdd1e
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 7 deletions.
11 changes: 5 additions & 6 deletions src/video/SDL_video.c
Expand Up @@ -743,12 +743,11 @@ SDL_Surface * SDL_SetVideoMode (int width, int height, int bpp, Uint32 flags)
/* Load GL symbols (before MakeCurrent, where we need glGetString). */
if ( flags & (SDL_OPENGL | SDL_OPENGLBLIT) ) {

#ifdef __QNXNTO__
#if (_NTO_VERSION < 630)
#define __SDL_NOGETPROCADDR__
#endif /* 6.3.0 */
#endif /* __QNXNTO__ */

#if (defined(macintosh) && !defined(__MWERKS__))
#define __SDL_NOGETPROCADDR__
#elif defined(__QNXNTO__) && (_NTO_VERSION < 630)
#define __SDL_NOGETPROCADDR__
#endif
#ifdef __SDL_NOGETPROCADDR__
#define SDL_PROC(ret,func,params) video->func=func;
#else
Expand Down
7 changes: 6 additions & 1 deletion src/video/macrom/SDL_romvideo.c
Expand Up @@ -163,9 +163,14 @@ static SDL_VideoDevice *ROM_CreateDevice(int devindex)
#ifdef HAVE_OPENGL
device->GL_MakeCurrent = Mac_GL_MakeCurrent;
device->GL_SwapBuffers = Mac_GL_SwapBuffers;
#ifdef __MWERKS__
device->GL_LoadLibrary = Mac_GL_LoadLibrary;
device->GL_GetProcAddress = Mac_GL_GetProcAddress;
#endif
#else
device->GL_LoadLibrary = NULL;
device->GL_GetProcAddress = NULL;
#endif // CodeWarrior
#endif // Have OpenGL
device->SetCaption = Mac_SetCaption;
device->SetIcon = NULL;
device->IconifyWindow = NULL;
Expand Down

0 comments on commit 54fdd1e

Please sign in to comment.