From 0559065b5af854611309bf0dee9cc0d80ae9eb46 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Thu, 21 Feb 2019 02:42:13 -0500 Subject: [PATCH] Cleaned up debug code for loading SDL2. --- src/SDL12_compat.c | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/SDL12_compat.c b/src/SDL12_compat.c index cc1b7d98e..de389f406 100644 --- a/src/SDL12_compat.c +++ b/src/SDL12_compat.c @@ -772,12 +772,16 @@ static void * LoadSDL20Symbol(const char *fn, int *okay) { void *retval = NULL; - if (*okay) /* only bother trying if we haven't previously failed. */ - { + if (*okay) { /* only bother trying if we haven't previously failed. */ retval = LookupSDL20Sym(fn); -if (!retval) { fprintf(stderr, "WARNING: LOAD FAILED: %s\n", fn); } -// if (retval == NULL) -// *okay = 0; + if (retval == NULL) { + /* Flip to 1 to warn but maybe work if nothing calls that function, flip to zero to fail out. */ + #if 0 + fprintf(stderr, "WARNING: LOAD FAILED: %s\n", fn); + #else + *okay = 0; + #endif + } } return retval; }