src/SDL12_compat.c
changeset 55 852e5d3808f2
parent 54 3511abf3a80d
child 56 a8a08936f60f
     1.1 --- a/src/SDL12_compat.c	Wed Feb 13 08:33:29 2019 -0500
     1.2 +++ b/src/SDL12_compat.c	Wed Feb 13 17:48:31 2019 -0500
     1.3 @@ -114,14 +114,8 @@
     1.4  #define SDL20_SYM(rc,fn,params,args,ret) \
     1.5      typedef rc (SDLCALL *SDL20_##fn##_t) params; \
     1.6      static SDL20_##fn##_t SDL20_##fn = NULL;
     1.7 -#define SDL20_SYM_PASSTHROUGH(rc,fn,params,args,ret) \
     1.8 -    SDL20_SYM(rc,fn,params,args,ret)
     1.9  #include "SDL20_syms.h"
    1.10  
    1.11 -/* this doesn't get handled in SDL20_syms.h because it uses varargs. */
    1.12 -typedef int (SDLCALL *SDL20_SetError_t)(const char *fmt, ...);
    1.13 -static SDL20_SetError_t SDL20_SetError = NULL;
    1.14 -
    1.15  /* Things that _should_ be binary compatible pass right through... */
    1.16  #define SDL20_SYM_PASSTHROUGH(rc,fn,params,args,ret) \
    1.17      DECLSPEC rc SDLCALL SDL_##fn params { ret SDL20_##fn args; }
    1.18 @@ -491,8 +485,9 @@
    1.19      if (*okay)  /* only bother trying if we haven't previously failed. */
    1.20      {
    1.21          retval = LookupSDL20Sym(fn);
    1.22 -        if (retval == NULL)
    1.23 -            *okay = 0;
    1.24 +if (!retval) { fprintf(stderr, "WARNING: LOAD FAILED: %s\n", fn); }
    1.25 +//        if (retval == NULL)
    1.26 +//            *okay = 0;
    1.27      }
    1.28      return retval;
    1.29  }
    1.30 @@ -501,9 +496,7 @@
    1.31  UnloadSDL20(void)
    1.32  {
    1.33      #define SDL20_SYM(rc,fn,params,args,ret) SDL20_##fn = NULL;
    1.34 -    #define SDL20_SYM_PASSTHROUGH(rc,fn,params,args,ret) SDL20_SYM(rc,fn,params,args,ret)
    1.35      #include "SDL20_syms.h"
    1.36 -    SDL20_SetError = NULL;
    1.37      CloseSDL20Library();
    1.38  }
    1.39  
    1.40 @@ -515,9 +508,7 @@
    1.41      {
    1.42          okay = LoadSDL20Library();
    1.43          #define SDL20_SYM(rc,fn,params,args,ret) SDL20_##fn = (SDL20_##fn##_t) LoadSDL20Symbol("SDL_" #fn, &okay);
    1.44 -        #define SDL20_SYM_PASSTHROUGH(rc,fn,params,args,ret) SDL20_SYM(rc,fn,params,args,ret)
    1.45          #include "SDL20_syms.h"
    1.46 -        SDL20_SetError = (SDL20_SetError_t) LoadSDL20Symbol("SDL_SetError", &okay);
    1.47          if (!okay)
    1.48              UnloadSDL20();
    1.49      }