mirror of
https://github.com/Relintai/sdl2_frt.git
synced 2024-12-16 11:06:49 +01:00
x11: Pass generic XEvents by pointer instead of copying to stack for XInput2.
This commit is contained in:
parent
01e0d8fc85
commit
5574b43376
@ -303,10 +303,10 @@ static char* X11_URIToLocal(char* uri) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
|
#if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
|
||||||
static void X11_HandleGenericEvent(SDL_VideoData *videodata,XEvent event)
|
static void X11_HandleGenericEvent(SDL_VideoData *videodata, XEvent *xev)
|
||||||
{
|
{
|
||||||
/* event is a union, so cookie == &event, but this is type safe. */
|
/* event is a union, so cookie == &event, but this is type safe. */
|
||||||
XGenericEventCookie *cookie = &event.xcookie;
|
XGenericEventCookie *cookie = &xev->xcookie;
|
||||||
if (X11_XGetEventData(videodata->display, cookie)) {
|
if (X11_XGetEventData(videodata->display, cookie)) {
|
||||||
X11_HandleXinput2Event(videodata, cookie);
|
X11_HandleXinput2Event(videodata, cookie);
|
||||||
X11_XFreeEventData(videodata->display, cookie);
|
X11_XFreeEventData(videodata->display, cookie);
|
||||||
@ -696,7 +696,7 @@ X11_DispatchEvent(_THIS)
|
|||||||
|
|
||||||
#if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
|
#if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
|
||||||
if(xevent.type == GenericEvent) {
|
if(xevent.type == GenericEvent) {
|
||||||
X11_HandleGenericEvent(videodata,xevent);
|
X11_HandleGenericEvent(videodata, &xevent);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user