diff options
author | jmcneill <jmcneill@pkgsrc.org> | 2015-02-25 12:45:59 +0000 |
---|---|---|
committer | jmcneill <jmcneill@pkgsrc.org> | 2015-02-25 12:45:59 +0000 |
commit | b0a8c8d80f8f0e9a56af5f38a1036f4669933902 (patch) | |
tree | 6b51adddd9ebbf30d3253a34e7a80f9d61033f21 /devel/SDL2 | |
parent | 95c4c0653e3229893344d47d3292e39ca3e4e594 (diff) | |
download | pkgsrc-b0a8c8d80f8f0e9a56af5f38a1036f4669933902.tar.gz |
flush any pending events from the joystick device when opening on netbsd, bump PKGREVISION
Diffstat (limited to 'devel/SDL2')
-rw-r--r-- | devel/SDL2/Makefile | 4 | ||||
-rw-r--r-- | devel/SDL2/distinfo | 4 | ||||
-rw-r--r-- | devel/SDL2/patches/patch-src_joystick_bsd_SDL__sysjoystick.c | 12 |
3 files changed, 14 insertions, 6 deletions
diff --git a/devel/SDL2/Makefile b/devel/SDL2/Makefile index 2f7df5e16f9..c4af019953c 100644 --- a/devel/SDL2/Makefile +++ b/devel/SDL2/Makefile @@ -1,7 +1,7 @@ -# $NetBSD: Makefile,v 1.12 2015/02/21 23:35:39 ryoon Exp $ +# $NetBSD: Makefile,v 1.13 2015/02/25 12:45:59 jmcneill Exp $ DISTNAME= SDL2-2.0.3 -PKGREVISION= 6 +PKGREVISION= 7 CATEGORIES= devel MASTER_SITES= http://www.libsdl.org/release/ diff --git a/devel/SDL2/distinfo b/devel/SDL2/distinfo index 42b649c3994..11c322d2adf 100644 --- a/devel/SDL2/distinfo +++ b/devel/SDL2/distinfo @@ -1,11 +1,11 @@ -$NetBSD: distinfo,v 1.9 2015/02/13 23:31:06 jmcneill Exp $ +$NetBSD: distinfo,v 1.10 2015/02/25 12:45:59 jmcneill Exp $ SHA1 (SDL2-2.0.3.tar.gz) = 21c45586a4e94d7622e371340edec5da40d06ecc RMD160 (SDL2-2.0.3.tar.gz) = e6f3718c7366c5da793c1454cf0ec0972e8bd347 Size (SDL2-2.0.3.tar.gz) = 3871267 bytes SHA1 (patch-configure) = 7f0469ef69c2a7fc6a769435f0d29a01148df122 SHA1 (patch-src_cpuinfo_SDL_cpuinfo.c) = 9482910e62023b92e80ce4d3b670a1a1e666789f -SHA1 (patch-src_joystick_bsd_SDL__sysjoystick.c) = 9bfc6667d67bfa7e5d45aa4aaf5a2bbb94d4bdc8 +SHA1 (patch-src_joystick_bsd_SDL__sysjoystick.c) = 5d2b4d560196a861d4d3e459478d4528f3b759b7 SHA1 (patch-src_thread_pthread_SDL__systhread.c) = 68f32770d067d2b6dcffe96da2dd4aa6b4c82050 SHA1 (patch-src_video_SDL__egl.c) = 67e9bc3a32616b3c6e86c5bc5ccd475f55fbcfa7 SHA1 (patch-src_video_x11_SDL__x11opengl.c) = a435634da8b8bd5e74a281b9a26e8fb8a294e56b diff --git a/devel/SDL2/patches/patch-src_joystick_bsd_SDL__sysjoystick.c b/devel/SDL2/patches/patch-src_joystick_bsd_SDL__sysjoystick.c index a9d9f059ff3..78323d5405d 100644 --- a/devel/SDL2/patches/patch-src_joystick_bsd_SDL__sysjoystick.c +++ b/devel/SDL2/patches/patch-src_joystick_bsd_SDL__sysjoystick.c @@ -1,4 +1,4 @@ -$NetBSD: patch-src_joystick_bsd_SDL__sysjoystick.c,v 1.1 2015/02/13 23:31:06 jmcneill Exp $ +$NetBSD: patch-src_joystick_bsd_SDL__sysjoystick.c,v 1.2 2015/02/25 12:45:59 jmcneill Exp $ Skip non-joystick HID devices, and give joysticks on NetBSD a human readable name. @@ -53,7 +53,7 @@ name. if (report_alloc(rep, hw->repdesc, REPORT_INPUT) < 0) { goto usberr; } -@@ -414,6 +446,11 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joy, +@@ -414,9 +446,19 @@ SDL_SYS_JoystickOpen(SDL_Joystick * joy, if (hw->axis_map[i] > 0) hw->axis_map[i] = joy->naxes++; @@ -65,3 +65,11 @@ name. usbend: /* The poll blocks the event thread. */ fcntl(fd, F_SETFL, O_NONBLOCK); ++#ifdef __NetBSD__ ++ /* Flush pending events */ ++ while (read(joy->hwdata->fd, REP_BUF_DATA(rep), rep->size) == rep->size) ++ ; ++#endif + + return (0); + usberr: |