Commit 899552b9 authored by Ryan C. Gordon's avatar Ryan C. Gordon

Date: Sun, 04 Dec 2005 21:43:46 -0500

From: Jonathan Atkins <jcatki@jcatki.no-ip.org>
Subject: SDL patch: DGA key events

I kept seeing DGA die on me whenever I press a key.
I tracked it down and it seems that the new indirect X via pointers
system messed it up.  It needed to have the pX* pointers well defined to
call, in particular, pXNextEvent.  Also, the X11_TranslateKey function
prototype was changed, but not updated in the dga driver.  perhaps other
files are also affected.

Not sure what releases may suffer from this too.

thanks!
	-Jon Atkins

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401197
parent 11bce0a3
...@@ -36,10 +36,13 @@ static char rcsid = ...@@ -36,10 +36,13 @@ static char rcsid =
#include "SDL_dgavideo.h" #include "SDL_dgavideo.h"
#include "SDL_dgaevents_c.h" #include "SDL_dgaevents_c.h"
/* get function pointers... */
#include "../x11/SDL_x11dyn.h"
/* Heheh we're using X11 event code */ /* Heheh we're using X11 event code */
extern int X11_Pending(Display *display); extern int X11_Pending(Display *display);
extern void X11_InitKeymap(void); extern void X11_InitKeymap(void);
extern SDL_keysym *X11_TranslateKey(Display *display, XKeyEvent *xkey, extern SDL_keysym *X11_TranslateKey(Display *display, XIC ic, XKeyEvent *xkey,
KeyCode kc, SDL_keysym *keysym); KeyCode kc, SDL_keysym *keysym);
static int DGA_DispatchEvent(_THIS) static int DGA_DispatchEvent(_THIS)
...@@ -84,7 +87,7 @@ static int DGA_DispatchEvent(_THIS) ...@@ -84,7 +87,7 @@ static int DGA_DispatchEvent(_THIS)
SDL_NAME(XDGAKeyEventToXKeyEvent)(&xevent.xkey, &xkey); SDL_NAME(XDGAKeyEventToXKeyEvent)(&xevent.xkey, &xkey);
posted = SDL_PrivateKeyboard((xevent.type == KeyPress), posted = SDL_PrivateKeyboard((xevent.type == KeyPress),
X11_TranslateKey(DGA_Display, X11_TranslateKey(DGA_Display, NULL/*no XIC*/,
&xkey, xkey.keycode, &xkey, xkey.keycode,
&keysym)); &keysym));
} }
......
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