x11: Pass generic XEvents by pointer instead of copying to stack for XInput2.
authorRyan C. Gordon <icculus@icculus.org>
Mon, 31 Jul 2017 12:22:18 -0400
changeset 113333f0b31578620
parent 11332 e3797888c6f1
child 11334 749cb40916f2
x11: Pass generic XEvents by pointer instead of copying to stack for XInput2.
src/video/x11/SDL_x11events.c
     1.1 --- a/src/video/x11/SDL_x11events.c	Sat Aug 19 15:02:03 2017 -0400
     1.2 +++ b/src/video/x11/SDL_x11events.c	Mon Jul 31 12:22:18 2017 -0400
     1.3 @@ -303,10 +303,10 @@
     1.4  }
     1.5  
     1.6  #if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
     1.7 -static void X11_HandleGenericEvent(SDL_VideoData *videodata,XEvent event)
     1.8 +static void X11_HandleGenericEvent(SDL_VideoData *videodata, XEvent *xev)
     1.9  {
    1.10      /* event is a union, so cookie == &event, but this is type safe. */
    1.11 -    XGenericEventCookie *cookie = &event.xcookie;
    1.12 +    XGenericEventCookie *cookie = &xev->xcookie;
    1.13      if (X11_XGetEventData(videodata->display, cookie)) {
    1.14          X11_HandleXinput2Event(videodata, cookie);
    1.15          X11_XFreeEventData(videodata->display, cookie);
    1.16 @@ -696,7 +696,7 @@
    1.17  
    1.18  #if SDL_VIDEO_DRIVER_X11_SUPPORTS_GENERIC_EVENTS
    1.19      if(xevent.type == GenericEvent) {
    1.20 -        X11_HandleGenericEvent(videodata,xevent);
    1.21 +        X11_HandleGenericEvent(videodata, &xevent);
    1.22          return;
    1.23      }
    1.24  #endif