Skip to content

Commit

Permalink
od: Fix sdl2 joystick translator driver
Browse files Browse the repository at this point in the history
1. Add `JoystickGetDevicePath` needed from SDL2 2.23.1.
   See libsdl-org/SDL@e551384

2. Run autogen.sh for the new `--enable-joystick-translator`
to be supported.

Signed-off-by: Gleb Mazovetskiy <[email protected]>
  • Loading branch information
glebm committed Oct 30, 2023
1 parent 5f2f74a commit 77e11e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
4 changes: 4 additions & 0 deletions board/opendingux/package/sdl2/sdl2.mk
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
SDL2_CONF_OPTS += --enable-joystick-translator
SDL2_AUTORECONF = YES
define SDL2_RUN_AUTOGEN
cd $(@D) && PATH=$(BR_PATH) ./autogen.sh
endef
SDL2_PRE_CONFIGURE_HOOKS += SDL2_RUN_AUTOGEN
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ new file mode 100644
index 0000000..75e3f6e
--- /dev/null
+++ b/src/joystick/translator/SDL_translator.c
@@ -0,0 +1,492 @@
@@ -0,0 +1,499 @@
+/*
+ Simple DirectMedia Layer
+ Copyright (C) 2021 Paul Cercueil <[email protected]>
Expand Down Expand Up @@ -743,12 +743,19 @@ index 0000000..75e3f6e
+ return SDL_Unsupported();
+}
+
+static const char *
+TRANSLATOR_JoystickGetDevicePath(int device_index)
+{
+ return NULL;
+}
+
+SDL_JoystickDriver SDL_TRANSLATOR_JoystickDriver =
+{
+ TRANSLATOR_JoystickInit,
+ TRANSLATOR_JoystickGetCount,
+ TRANSLATOR_JoystickDetect,
+ TRANSLATOR_JoystickGetDeviceName,
+ TRANSLATOR_JoystickGetDevicePath,
+ TRANSLATOR_JoystickGetDevicePlayerIndex,
+ TRANSLATOR_JoystickSetDevicePlayerIndex,
+ TRANSLATOR_JoystickGetDeviceGUID,
Expand Down

0 comments on commit 77e11e0

Please sign in to comment.