forked from buildroot/buildroot
-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
od: Fix sdl2 joystick translator driver
1. Add `JoystickGetDevicePath` needed from SDL2 2.23.1. See libsdl-org/SDL@e551384 2. Update the GUID using the scheme required from SDL2 2.25.1. See libsdl-org/SDL@c1e0873 3. Run autogen.sh for the new `--enable-joystick-translator` to be supported. Signed-off-by: Gleb Mazovetskiy <glex.spb@gmail.com>
- Loading branch information
Showing
3 changed files
with
45 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,30 @@ | ||
case "$MODEL" in | ||
ylm,rg350*) | ||
# RG-350 / RG-350M: two clickable analog sticks | ||
SDL_JOYSTICK_TRANSLATOR_MAP='OpenDingux Virtual Device,axis:190000006a6f79737469636b00000000:0,axis:190000006a6f79737469636b00000000:1,axis:190000006a6f79737469636b00000000:2,axis:190000006a6f79737469636b00000000:3,btn:kb:224,btn:kb:226,btn:kb:225,btn:kb:44,btn:kb:40,btn:kb:41,btn:kb:43,btn:kb:42,btn:kb:75,btn:kb:78,btn:kb:84,btn:kb:99,hat:kb:82:79:81:80' | ||
SDL_GAMECONTROLLERCONFIG='4f70656e44696e677578204743572d5a,OpenDingux Virtual Device,platform:Linux,a:b1,b:b0,x:b2,y:b3,back:b5,start:b4,leftstick:b10,rightstick:b11,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9' | ||
SDL_JOYSTICK_TRANSLATOR_MAP='OpenDingux Virtual Device,axis:1900b5c06a6f79737469636b00000000:0,axis:1900b5c06a6f79737469636b00000000:1,axis:1900b5c06a6f79737469636b00000000:2,axis:1900b5c06a6f79737469636b00000000:3,btn:kb:224,btn:kb:226,btn:kb:225,btn:kb:44,btn:kb:40,btn:kb:41,btn:kb:43,btn:kb:42,btn:kb:75,btn:kb:78,btn:kb:84,btn:kb:99,hat:kb:82:79:81:80' | ||
SDL_GAMECONTROLLERCONFIG='000065d64f70656e44696e6775782056,OpenDingux Virtual Device,platform:Linux,a:b1,b:b0,x:b2,y:b3,back:b5,start:b4,leftstick:b10,rightstick:b11,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9' | ||
;; | ||
ylm,rg280m) | ||
# RG-280M: One clickable analog stick | ||
SDL_JOYSTICK_TRANSLATOR_MAP='OpenDingux Virtual Device,axis:190000006a6f79737469636b00000000:0,axis:190000006a6f79737469636b00000000:1,btn:kb:224,btn:kb:226,btn:kb:225,btn:kb:44,btn:kb:40,btn:kb:41,btn:kb:43,btn:kb:42,btn:kb:75,btn:kb:78,btn:kb:84,hat:kb:82:79:81:80' | ||
SDL_GAMECONTROLLERCONFIG='4f70656e44696e677578204743572d5a,OpenDingux Virtual Device,platform:Linux,a:b1,b:b0,x:b2,y:b3,back:b5,start:b4,leftstick:b10,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9' | ||
SDL_JOYSTICK_TRANSLATOR_MAP='OpenDingux Virtual Device,axis:1900b5c06a6f79737469636b00000000:0,axis:1900b5c06a6f79737469636b00000000:1,btn:kb:224,btn:kb:226,btn:kb:225,btn:kb:44,btn:kb:40,btn:kb:41,btn:kb:43,btn:kb:42,btn:kb:75,btn:kb:78,btn:kb:84,hat:kb:82:79:81:80' | ||
SDL_GAMECONTROLLERCONFIG='000065d64f70656e44696e6775782056,OpenDingux Virtual Device,platform:Linux,a:b1,b:b0,x:b2,y:b3,back:b5,start:b4,leftstick:b10,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9' | ||
;; | ||
gcw,zero|wolsen,pocketgo2*) | ||
# GCW-Zero, PocketGo2/PlayGo: One non-clickable analog stick | ||
SDL_JOYSTICK_TRANSLATOR_MAP='OpenDingux Virtual Device,axis:190000006a6f79737469636b00000000:0,axis:190000006a6f79737469636b00000000:1,btn:kb:224,btn:kb:226,btn:kb:225,btn:kb:44,btn:kb:40,btn:kb:41,btn:kb:43,btn:kb:42,btn:kb:75,btn:kb:78,hat:kb:82:79:81:80' | ||
SDL_GAMECONTROLLERCONFIG='4f70656e44696e677578204743572d5a,OpenDingux Virtual Device,platform:Linux,a:b1,b:b0,x:b2,y:b3,back:b5,start:b4,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9' | ||
SDL_JOYSTICK_TRANSLATOR_MAP='OpenDingux Virtual Device,axis:1900b5c06a6f79737469636b00000000:0,axis:1900b5c06a6f79737469636b00000000:1,btn:kb:224,btn:kb:226,btn:kb:225,btn:kb:44,btn:kb:40,btn:kb:41,btn:kb:43,btn:kb:42,btn:kb:75,btn:kb:78,hat:kb:82:79:81:80' | ||
SDL_GAMECONTROLLERCONFIG='000065d64f70656e44696e6775782056,OpenDingux Virtual Device,platform:Linux,a:b1,b:b0,x:b2,y:b3,back:b5,start:b4,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,leftx:a0,lefty:a1,rightx:a2,righty:a3,lefttrigger:b8,righttrigger:b9' | ||
;; | ||
img,ci20) | ||
# CI20: Don't create a gamepad | ||
;; | ||
ylm,rg280v|qishenglong,gopher2*) | ||
# RG-280V, Gopher2: No analog stick, with L2/R2 | ||
SDL_JOYSTICK_TRANSLATOR_MAP='OpenDingux Virtual Device,btn:kb:224,btn:kb:226,btn:kb:225,btn:kb:44,btn:kb:40,btn:kb:41,btn:kb:43,btn:kb:42,btn:kb:75,btn:kb:78,hat:kb:82:79:81:80' | ||
SDL_GAMECONTROLLERCONFIG='4f70656e44696e677578204743572d5a,OpenDingux Virtual Device,platform:Linux,a:b1,b:b0,x:b2,y:b3,back:b5,start:b4,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,lefttrigger:b8,righttrigger:b9' | ||
SDL_GAMECONTROLLERCONFIG='000065d64f70656e44696e6775782056,OpenDingux Virtual Device,platform:Linux,a:b1,b:b0,x:b2,y:b3,back:b5,start:b4,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2,lefttrigger:b8,righttrigger:b9' | ||
;; | ||
*) | ||
# Default: No analog stick, without L2/R2 | ||
SDL_JOYSTICK_TRANSLATOR_MAP='OpenDingux Virtual Device,btn:kb:224,btn:kb:226,btn:kb:225,btn:kb:44,btn:kb:40,btn:kb:41,btn:kb:43,btn:kb:42,hat:kb:82:79:81:80' | ||
SDL_GAMECONTROLLERCONFIG='4f70656e44696e677578204743572d5a,OpenDingux Virtual Device,platform:Linux,a:b1,b:b0,x:b2,y:b3,back:b5,start:b4,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2' | ||
SDL_GAMECONTROLLERCONFIG='000065d64f70656e44696e6775782056,OpenDingux Virtual Device,platform:Linux,a:b1,b:b0,x:b2,y:b3,back:b5,start:b4,leftshoulder:b6,rightshoulder:b7,dpup:h0.1,dpdown:h0.4,dpleft:h0.8,dpright:h0.2' | ||
;; | ||
esac |