Commit 7bcb6190 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Date: Mon, 4 Jun 2007 06:17:59 +0000 (UTC)

From: George Gensure <werkt0@gmail.com>
Subject: [SDL] error removal patch for SDL_x11dyn.c

I found that calling SDL_GetError when an error hasn't necessarily occurred is
still reporting problems from loadso regarding dynamic functions in X11.  I've
added the following to my local copy to avoid revealing the 'many library
lookup' approach adopted by x11dyn.c:

--HG--
branch : SDL-1.2
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/branches/SDL-1.2%402341
parent 93533895
...@@ -73,6 +73,11 @@ static void X11_GetSym(const char *fnname, int *rc, void **fn) ...@@ -73,6 +73,11 @@ static void X11_GetSym(const char *fnname, int *rc, void **fn)
} }
} }
if (*fn != NULL)
SDL_ClearError();
else
SDL_SetError("Failed to load function %s from x11libs", fnname);
#if DEBUG_DYNAMIC_X11 #if DEBUG_DYNAMIC_X11
if (*fn != NULL) if (*fn != NULL)
printf("X11: Found '%s' in %s (%p)\n", fnname, x11libs[i].libname, *fn); printf("X11: Found '%s' in %s (%p)\n", fnname, x11libs[i].libname, *fn);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment