Merge pull request #1830 from fewtarius/dev
Manage GMU music player input configuration.
This commit is contained in:
commit
4a8d476dcf
5 changed files with 44 additions and 2 deletions
|
@ -44,7 +44,7 @@ SDL.SecondsUntilBacklightPowerOff=0
|
|||
SDL.SmallCoverArtworkAlignment=right
|
||||
SDL.TimeDisplay=elapsed
|
||||
SDL.Width=1280
|
||||
SDL.InputConfigFile=gmuinput.caanoo.conf
|
||||
SDL.InputConfigFile=/storage/.config/gmu/gmuinput.conf
|
||||
SDL.KeyMap=caanoo.keymap
|
||||
Log.File=gmutracks.log
|
||||
Notify.Enable=yes
|
||||
|
|
17
packages/multimedia/gmu/config/gmuinput.conf
Normal file
17
packages/multimedia/gmu/config/gmuinput.conf
Normal file
|
@ -0,0 +1,17 @@
|
|||
FullKeyboard=no
|
||||
JoyButton-0=@DEVICE_BTN_SOUTH@,A
|
||||
JoyButton-1=@DEVICE_BTN_WEST@,X
|
||||
JoyButton-2=@DEVICE_BTN_EAST@,B
|
||||
JoyButton-3=@DEVICE_BTN_NORTH@,Y
|
||||
JoyButton-4=@DEVICE_BTN_START@,Lock
|
||||
JoyButton-5=@DEVICE_BTN_THUMBL@,HelpI
|
||||
JoyButton-6=@DEVICE_BTN_THUMBR@,HelpII
|
||||
JoyButton-7=@DEVICE_BTN_TR2@,StickClick
|
||||
JoyButton-8=@DEVICE_BTN_TL@,L
|
||||
JoyButton-9=@DEVICE_BTN_TR@,R
|
||||
JoyButton-10=@DEVICE_BTN_SELECT@,Home
|
||||
JoyButton-11=@DEVICE_BTN_START@,Unlock,R
|
||||
JoyAxis-0=-1,Left
|
||||
JoyAxis-1=1,Right
|
||||
JoyAxis-2=-2,Up
|
||||
JoyAxis-3=2,Down
|
|
@ -29,7 +29,7 @@ make_target() {
|
|||
|
||||
post_makeinstall_target() {
|
||||
mkdir -p ${INSTALL}/usr/config/gmu/playlists
|
||||
cp -f ${PKG_DIR}/config/gmu.conf ${INSTALL}/usr/config/gmu
|
||||
cp -f ${PKG_DIR}/config/* ${INSTALL}/usr/config/gmu
|
||||
|
||||
mkdir -p ${INSTALL}/usr/bin
|
||||
cp -f ${PKG_DIR}/scripts/start_gmu.sh ${INSTALL}/usr/bin
|
||||
|
|
13
packages/multimedia/gmu/patches/002-no-input-path.patch
Normal file
13
packages/multimedia/gmu/patches/002-no-input-path.patch
Normal file
|
@ -0,0 +1,13 @@
|
|||
diff --git a/src/frontends/sdl/sdl.c b/src/frontends/sdl/sdl.c
|
||||
index 7a31fc0..a6b114d 100644
|
||||
--- a/src/frontends/sdl/sdl.c
|
||||
+++ b/src/frontends/sdl/sdl.c
|
||||
@@ -110,7 +110,7 @@ static void input_device_config(void)
|
||||
gmu_core_config_acquire_lock();
|
||||
inputconf = cfg_get_key_value(config, "SDL.InputConfigFile");
|
||||
if (!inputconf) inputconf = "gmuinput.conf";
|
||||
- snprintf(tmp, 255, "%s/%s", gmu_core_get_config_dir(), inputconf);
|
||||
+ snprintf(tmp, 255, "%s", inputconf);
|
||||
tmp[255] = '\0';
|
||||
gmu_core_config_release_lock();
|
||||
input_config_init(tmp);
|
|
@ -8,6 +8,7 @@ jslisten set "-HUP gmu.bin"
|
|||
|
||||
GMUPATH="/storage/.config/gmu"
|
||||
GMUCONFIG="${GMUPATH}/gmu.conf"
|
||||
GMUINPUT="${GMUPATH}/gmuinput.conf"
|
||||
|
||||
if [ -d "/storage/.local/share/gmu" ]
|
||||
then
|
||||
|
@ -43,5 +44,16 @@ then
|
|||
PLAYLIST="-l \"${1}\""
|
||||
fi
|
||||
|
||||
### Set up controls
|
||||
for CONTROL in DEVICE_BTN_SOUTH DEVICE_BTN_EAST DEVICE_BTN_NORTH \
|
||||
DEVICE_BTN_WEST DEVICE_BTN_TL DEVICE_BTN_TR \
|
||||
DEVICE_BTN_TL2 DEVICE_BTN_TR2 DEVICE_BTN_SELECT \
|
||||
DEVICE_BTN_START DEVICE_BTN_MODE DEVICE_BTN_THUMBL \
|
||||
DEVICE_BTN_THUMBR DEVICE_BTN_DPAD_UP DEVICE_BTN_DPAD_DOWN \
|
||||
DEVICE_BTN_DPAD_LEFT DEVICE_BTN_DPAD_RIGHT
|
||||
do
|
||||
sed -i "s~@${CONTROL}@~${!CONTROL}~g" ${GMUINPUT}
|
||||
done
|
||||
|
||||
cd /usr/local/share/gmu
|
||||
/usr/local/bin/gmu.bin -d /usr/local/etc/gmu -c /storage/.config/gmu/gmu.conf ${PLAYLIST}
|
||||
|
|
Loading…
Reference in a new issue