Mercurial > sdl-ios-xcode
comparison src/video/x11/SDL_x11dyn.c @ 3957:b1d5b56aa549 SDL-1.2
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:
author | Ryan C. Gordon <icculus@icculus.org> |
---|---|
date | Wed, 13 Jun 2007 07:54:10 +0000 |
parents | 9e85b267f8f3 |
children | 85b6fb6a5e3c |
comparison
equal
deleted
inserted
replaced
3956:3868bebb9f5b | 3957:b1d5b56aa549 |
---|---|
70 *fn = SDL_LoadFunction(x11libs[i].lib, fnname); | 70 *fn = SDL_LoadFunction(x11libs[i].lib, fnname); |
71 if (*fn != NULL) | 71 if (*fn != NULL) |
72 break; | 72 break; |
73 } | 73 } |
74 } | 74 } |
75 | |
76 if (*fn != NULL) | |
77 SDL_ClearError(); | |
78 else | |
79 SDL_SetError("Failed to load function %s from x11libs", fnname); | |
75 | 80 |
76 #if DEBUG_DYNAMIC_X11 | 81 #if DEBUG_DYNAMIC_X11 |
77 if (*fn != NULL) | 82 if (*fn != NULL) |
78 printf("X11: Found '%s' in %s (%p)\n", fnname, x11libs[i].libname, *fn); | 83 printf("X11: Found '%s' in %s (%p)\n", fnname, x11libs[i].libname, *fn); |
79 else | 84 else |