From 6ab692ce7c8afc09b6a71abf695b70f18587b7db Mon Sep 17 00:00:00 2001 From: Juan RP Date: Thu, 9 Jun 2011 11:02:49 +0200 Subject: [PATCH] SDL: add patches forgotten in previous commit. --- .../sdl-1.2.14-fix-disappearing-cursor.patch | 17 ++++++++++++++ .../sdl-1.2.14-fix-mouse-clicking.patch | 23 +++++++++++++++++++ .../patches/sdl-1.2.14-joystick-crash.diff | 14 +++++++++++ 3 files changed, 54 insertions(+) create mode 100644 srcpkgs/SDL/patches/sdl-1.2.14-fix-disappearing-cursor.patch create mode 100644 srcpkgs/SDL/patches/sdl-1.2.14-fix-mouse-clicking.patch create mode 100644 srcpkgs/SDL/patches/sdl-1.2.14-joystick-crash.diff diff --git a/srcpkgs/SDL/patches/sdl-1.2.14-fix-disappearing-cursor.patch b/srcpkgs/SDL/patches/sdl-1.2.14-fix-disappearing-cursor.patch new file mode 100644 index 00000000000..fcd3c314df6 --- /dev/null +++ b/srcpkgs/SDL/patches/sdl-1.2.14-fix-disappearing-cursor.patch @@ -0,0 +1,17 @@ +Index: SDL-1.2.14/src/video/x11/SDL_x11events.c +=================================================================== +--- SDL-1.2.14.orig/src/video/x11/SDL_x11events.c 2010-04-30 09:16:35.000000000 -0400 ++++ SDL-1.2.14/src/video/x11/SDL_x11events.c 2010-04-30 09:16:35.000000000 -0400 +@@ -444,8 +444,10 @@ + if ( xevent.xcrossing.mode == NotifyUngrab ) + printf("Mode: NotifyUngrab\n"); + #endif +- if ( xevent.xcrossing.detail != NotifyInferior ) { +- if ( this->input_grab == SDL_GRAB_OFF ) { ++ if ( (xevent.xcrossing.mode != NotifyGrab) && ++ (xevent.xcrossing.mode != NotifyUngrab) && ++ (xevent.xcrossing.detail != NotifyInferior) ) { ++ if ( this->input_grab == SDL_GRAB_OFF ) { + posted = SDL_PrivateAppActive(0, SDL_APPMOUSEFOCUS); + } else { + posted = SDL_PrivateMouseMotion(0, 0, diff --git a/srcpkgs/SDL/patches/sdl-1.2.14-fix-mouse-clicking.patch b/srcpkgs/SDL/patches/sdl-1.2.14-fix-mouse-clicking.patch new file mode 100644 index 00000000000..7d3e5acfc14 --- /dev/null +++ b/srcpkgs/SDL/patches/sdl-1.2.14-fix-mouse-clicking.patch @@ -0,0 +1,23 @@ +--- SDL-1.2.14/src/video/x11/SDL_x11events.c.orig 2010-04-08 11:57:05.003169834 -0700 ++++ SDL-1.2.14/src/video/x11/SDL_x11events.c 2010-04-08 12:33:51.690926340 -0700 +@@ -423,12 +423,15 @@ + if ( xevent.xcrossing.mode == NotifyUngrab ) + printf("Mode: NotifyUngrab\n"); + #endif +- if ( this->input_grab == SDL_GRAB_OFF ) { +- posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS); ++ if ( (xevent.xcrossing.mode != NotifyGrab) && ++ (xevent.xcrossing.mode != NotifyUngrab) ) { ++ if ( this->input_grab == SDL_GRAB_OFF ) { ++ posted = SDL_PrivateAppActive(1, SDL_APPMOUSEFOCUS); ++ } ++ posted = SDL_PrivateMouseMotion(0, 0, ++ xevent.xcrossing.x, ++ xevent.xcrossing.y); + } +- posted = SDL_PrivateMouseMotion(0, 0, +- xevent.xcrossing.x, +- xevent.xcrossing.y); + } + break; + diff --git a/srcpkgs/SDL/patches/sdl-1.2.14-joystick-crash.diff b/srcpkgs/SDL/patches/sdl-1.2.14-joystick-crash.diff new file mode 100644 index 00000000000..949e18b96b7 --- /dev/null +++ b/srcpkgs/SDL/patches/sdl-1.2.14-joystick-crash.diff @@ -0,0 +1,14 @@ +Description: Fix crash with joystick detection. +Index: libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c +=================================================================== +--- libsdl1.2-1.2.14.orig/src/joystick/linux/SDL_sysjoystick.c 2010-01-12 12:37:36.000000000 -0500 ++++ libsdl1.2-1.2.14/src/joystick/linux/SDL_sysjoystick.c 2010-01-12 12:38:27.000000000 -0500 +@@ -700,7 +700,7 @@ + continue; + } + if ( test_bit(i, absbit) ) { +- int values[5]; ++ int values[6]; + + if ( ioctl(fd, EVIOCGABS(i), values) < 0 ) + continue;