22 #ifdef DYNAMICALLY_LOADED_SDL 27 static const char sdl_files[] =
30 M("SDL_InitSubSystem")
32 M("SDL_QuitSubSystem")
36 M("SDL_WM_SetCaption")
46 M("SDL_UnlockSurface")
51 M("SDL_EnableKeyRepeat")
52 M("SDL_EnableUNICODE")
53 M("SDL_VideoDriverName")
62 M("SDL_Linked_Version")
69 static const char *LoadSdlDLL()
71 if (sdl_proc.SDL_Init != NULL) {
75 return "Unable to load sdl.dll";
90 #ifdef DYNAMICALLY_LOADED_SDL 92 const char *s = LoadSdlDLL();
93 if (s != NULL)
return s;
97 if (SDL_CALL SDL_Init(x | SDL_INIT_NOPARACHUTE) == -1)
return SDL_CALL SDL_GetError();
99 if (SDL_CALL SDL_InitSubSystem(x) == -1)
return SDL_CALL SDL_GetError();
112 SDL_CALL SDL_QuitSubSystem(x);
static int _sdl_usage
Number of users of the SDL library.
const char * SdlOpen(uint32 x)
Open the SDL library.
bool LoadLibraryList(Function proc[], const char *dll)
Helper function needed by dynamically loading libraries XXX: Hurray for MS only having an ANSI GetPro...
Definition of base types and functions in a cross-platform compatible way.
A number of safeguards to prevent using unsafe methods.
void SdlClose(uint32 x)
Close the SDL library.
declarations of functions for MS windows systems