Cleaned up debug code for loading SDL2.
authorRyan C. Gordon <icculus@icculus.org>
Thu, 21 Feb 2019 02:42:13 -0500
changeset 84df9e8ff61b45
parent 83 3dc6727acc6b
child 85 03415a8f246a
Cleaned up debug code for loading SDL2.
src/SDL12_compat.c
     1.1 --- a/src/SDL12_compat.c	Thu Feb 21 02:39:28 2019 -0500
     1.2 +++ b/src/SDL12_compat.c	Thu Feb 21 02:42:13 2019 -0500
     1.3 @@ -772,12 +772,16 @@
     1.4  LoadSDL20Symbol(const char *fn, int *okay)
     1.5  {
     1.6      void *retval = NULL;
     1.7 -    if (*okay)  /* only bother trying if we haven't previously failed. */
     1.8 -    {
     1.9 +    if (*okay) { /* only bother trying if we haven't previously failed. */
    1.10          retval = LookupSDL20Sym(fn);
    1.11 -if (!retval) { fprintf(stderr, "WARNING: LOAD FAILED: %s\n", fn); }
    1.12 -//        if (retval == NULL)
    1.13 -//            *okay = 0;
    1.14 +        if (retval == NULL) {
    1.15 +            /* Flip to 1 to warn but maybe work if nothing calls that function, flip to zero to fail out. */
    1.16 +            #if 0
    1.17 +            fprintf(stderr, "WARNING: LOAD FAILED: %s\n", fn);
    1.18 +            #else
    1.19 +            *okay = 0;
    1.20 +            #endif
    1.21 +        }
    1.22      }
    1.23      return retval;
    1.24  }