From 4168c616b5a0519683f3595adb5d0275a7ea9be3 Mon Sep 17 00:00:00 2001 From: Jools Wills Date: Sat, 9 Apr 2016 22:07:12 +0100 Subject: [PATCH 1/4] Revert "Linux joystick: Look at entire axis namespace for controls (thanks, "spaz16"!)." This reverts commit 4cb7923f251543c1175c1702f8cf8b4201ce9054. see https://github.com/RetroPie/RetroPie-Setup/issues/1297 --- src/joystick/linux/SDL_sysjoystick.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/joystick/linux/SDL_sysjoystick.c b/src/joystick/linux/SDL_sysjoystick.c index bd52b1808..945e50720 100644 --- a/src/joystick/linux/SDL_sysjoystick.c +++ b/src/joystick/linux/SDL_sysjoystick.c @@ -459,7 +459,7 @@ ConfigJoystick(SDL_Joystick * joystick, int fd) ++joystick->nbuttons; } } - for (i = 0; i < ABS_MAX; ++i) { + for (i = 0; i < ABS_MISC; ++i) { /* Skip hats */ if (i == ABS_HAT0X) { i = ABS_HAT3Y; @@ -720,6 +720,10 @@ HandleInputEvents(SDL_Joystick * joystick) } break; case EV_ABS: + if (code >= ABS_MISC) { + break; + } + switch (code) { case ABS_HAT0X: case ABS_HAT0Y: From d69da415b9efd316a5d9ca40afd0446d843cf801 Mon Sep 17 00:00:00 2001 From: Jools Wills Date: Fri, 17 Feb 2017 17:16:05 +0000 Subject: [PATCH 2/4] packaging fixes - * updated debian/control to match debian/ubuntu package names * fix libudev dependency * rename libsdl2.install -> libsdl2-2.0-0.install --- debian/control | 12 ++++++------ debian/{libsdl2.install => libsdl2-2.0-0.install} | 0 2 files changed, 6 insertions(+), 6 deletions(-) rename debian/{libsdl2.install => libsdl2-2.0-0.install} (100%) diff --git a/debian/control b/debian/control index e61995df4..75c4d97d0 100644 --- a/debian/control +++ b/debian/control @@ -30,16 +30,16 @@ Build-Depends: debhelper (>= 9), libxxf86vm-dev Homepage: http://www.libsdl.org/ -Package: libsdl2 +Package: libsdl2-2.0-0 Architecture: any Multi-Arch: same Pre-Depends: ${misc:Pre-Depends} Depends: ${misc:Depends}, ${shlibs:Depends}, - libudev0 [linux-any], + libudev0 | libudev1 [linux-any], libdbus-1-3 [linux-any] -Conflicts: libsdl-1.3-0 -Replaces: libsdl-1.3-0 +Conflicts: libsdl-1.3-0, libsdl2 +Replaces: libsdl-1.3-0, libsdl2 Description: Simple DirectMedia Layer SDL is a library that allows programs portable low level access to a video framebuffer, audio output, mouse, and keyboard. @@ -51,7 +51,7 @@ Section: libdevel Architecture: any Multi-Arch: same Depends: ${misc:Depends}, - libsdl2 (= ${binary:Version}), + libsdl2-2.0-0 (= ${binary:Version}), libc6-dev, libgl1-mesa-dev Conflicts: libsdl-1.3-dev @@ -68,7 +68,7 @@ Section: debug Architecture: any Multi-Arch: same Depends: ${misc:Depends}, - libsdl2 (= ${binary:Version}), + libsdl2-2.0-0 (= ${binary:Version}), Description: Simple DirectMedia Layer debug files SDL is a library that allows programs portable low level access to a video framebuffer, audio output, mouse, and keyboard. diff --git a/debian/libsdl2.install b/debian/libsdl2-2.0-0.install similarity index 100% rename from debian/libsdl2.install rename to debian/libsdl2-2.0-0.install From e5c462b3a3e8557fd76cdd51106a7d62e357c8cb Mon Sep 17 00:00:00 2001 From: Jools Wills Date: Thu, 2 Mar 2017 18:02:44 +0000 Subject: [PATCH 3/4] Revert "Work-around for a hang when USB devices are unplugged, contributed by James Zipperer" This reverts commit f0a9a821497b8e9d3e2496a5c5ab844cdddc5e4c. --- src/audio/alsa/SDL_alsa_audio.c | 17 +++-------------- 1 file changed, 3 insertions(+), 14 deletions(-) diff --git a/src/audio/alsa/SDL_alsa_audio.c b/src/audio/alsa/SDL_alsa_audio.c index 574d51bd5..3fdbd820a 100644 --- a/src/audio/alsa/SDL_alsa_audio.c +++ b/src/audio/alsa/SDL_alsa_audio.c @@ -314,20 +314,9 @@ ALSA_PlayDevice(_THIS) swizzle_alsa_channels(this, this->hidden->mixbuf, frames_left); while ( frames_left > 0 && SDL_AtomicGet(&this->enabled) ) { - int status; - - /* This wait is a work-around for a hang when USB devices are - unplugged. Normally it should not result in any waiting, - but in the case of a USB unplug, it serves as a way to - join the playback thread after the timeout occurs */ - status = ALSA_snd_pcm_wait(this->hidden->pcm_handle, 1000); - if (status == 0) { - /*fprintf(stderr, "ALSA timeout waiting for available buffer space\n");*/ - SDL_OpenedAudioDeviceDisconnected(this); - return; - } - - status = ALSA_snd_pcm_writei(this->hidden->pcm_handle, + /* !!! FIXME: This works, but needs more testing before going live */ + /* ALSA_snd_pcm_wait(this->hidden->pcm_handle, -1); */ + int status = ALSA_snd_pcm_writei(this->hidden->pcm_handle, sample_buf, frames_left); if (status < 0) { From 686c83ce751102add30ab6ae23adc9591a5e3280 Mon Sep 17 00:00:00 2001 From: Jools Wills Date: Thu, 10 Aug 2017 18:35:21 +0100 Subject: [PATCH 4/4] disable mir as compilation fails on current ubuntu (and not needed for retropie). --- debian/rules | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/rules b/debian/rules index 4bde8f325..dff000cf3 100755 --- a/debian/rules +++ b/debian/rules @@ -6,7 +6,7 @@ DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) confflags = --disable-rpath --disable-video-directfb \ --disable-nas --disable-esd --disable-arts \ --disable-alsa-shared --disable-pulseaudio-shared \ - --disable-x11-shared + --disable-x11-shared --disable-video-mir %: dh $@ --parallel