jottt
Member
sounds simple enough for me not to fail horribly =) I'll have a try. Thanks!
So if I have a program that does dirty buffers or only draws individual sprites, Notaz SDL now forces a fullscreen copy for every blit? I guess only a few games work that way. At least it can be disabled.SDL has been updated today, get it with firmware update. It should no longer flicker on certain programs that don't do double buffering. Unfortunately this comes with performance loss, since it's impossible to have it blit directly to framebuffer and not flicker, so a offscreen buffer had to be used. This only affects programs that don't set SDL_DOUBLEBUF, those which do will continue to work as before. You can revert to old behavior by setting SDL_OMAP_FORCE_DIRECTBUF, see http://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=sdl_omap.git;a=blob;f=README.OMAP;hb=HEAD .
# HG changeset patch
# User Ryan C. Gordon <icculus@icculus.org>
# Date 1326873803 18000
# Branch SDL-1.2
# Node ID e1264a758d5030fa9ffe9904e6eefd2c38098f5b
# Parent 6f013dd0add1c6809aeab04e306892198a207616
Add dynamic symbol for _XGetRequest, which libX11 1.4.99.1 added.
Fixes Bugzilla #1376.
diff --git a/src/video/x11/SDL_x11dyn.c b/src/video/x11/SDL_x11dyn.c
--- a/src/video/x11/SDL_x11dyn.c
+++ b/src/video/x11/SDL_x11dyn.c
@@ -109,6 +109,21 @@
#undef SDL_X11_SYM
+static void *SDL_XGetRequest_workaround(Display* dpy, CARD8 type, size_t len)
+{
+ xReq *req;
+ WORD64ALIGN
+ if (dpy->bufptr + len > dpy->bufmax)
+ _XFlush(dpy);
+ dpy->last_req = dpy->bufptr;
+ req = (xReq*)dpy->bufptr;
+ req->reqType = type;
+ req->length = len / 4;
+ dpy->bufptr += len;
+ dpy->request++;
+ return req;
+}
+
static int x11_load_refcount = 0;
void SDL_X11_UnloadSymbols(void)
@@ -168,6 +183,15 @@
X11_GetSym("XGetICValues",&SDL_X11_HAVE_UTF8);
#endif
+ /*
+ * In case we're built with newer Xlib headers, we need to make sure
+ * that _XGetRequest() is available, even on older systems.
+ * Otherwise, various Xlib macros we use will call a NULL pointer.
+ */
+ if (!SDL_X11_HAVE_XGETREQUEST) {
+ p_XGetRequest = SDL_XGetRequest_workaround;
+ }
+
if (SDL_X11_HAVE_BASEXLIB) { /* all required symbols loaded. */
SDL_ClearError();
} else {
diff --git a/src/video/x11/SDL_x11sym.h b/src/video/x11/SDL_x11sym.h
--- a/src/video/x11/SDL_x11sym.h
+++ b/src/video/x11/SDL_x11sym.h
@@ -170,6 +170,12 @@
#endif
/*
+ * libX11 1.4.99.1 added _XGetRequest, and macros use it behind the scenes.
+ */
+SDL_X11_MODULE(XGETREQUEST)
+SDL_X11_SYM(void *,_XGetRequest,(Display* a,CARD8 b,size_t c),(a,b,c),return)
+
+/*
* These only show up on some variants of Unix.
*/
#if defined(__osf__)