Merge pull request #48 from hdkiller/2.4.3

make parameteres compatible with moonlight 2.4.3
This commit is contained in:
Gustavo 2017-09-17 07:05:41 -03:00 committed by GitHub
commit 4d944396b8
2 changed files with 15 additions and 14 deletions

View file

@ -4,6 +4,14 @@
oe_setup_addon script.moonlight
# copy gamecontrollerdb.txt to folder
MOONLIGHT_CONF_DIR="/storage/.config/moonlight"
if [ ! -f "$MOONLIGHT_CONF_DIR/gamecontrollerdb.txt" ]; then
mkdir -p $MOONLIGHT_CONF_DIR
cp $ADDON_DIR/etc/gamecontrollerdb.txt $MOONLIGHT_CONF_DIR
fi
while [ 1 ]; do
if [ -f $ADDON_DIR/start_moonlight.tmp ]; then
@ -25,18 +33,16 @@ while [ 1 ]; do
MOONLIGHT_ARG="$MOONLIGHT_ARG -720"
elif [ "$MOON_RESOLUTION" = "1080p" ]; then
MOONLIGHT_ARG="$MOONLIGHT_ARG -1080"
elif [ "$MOON_RESOLUTION" = "4k" ]; then
MOONLIGHT_ARG="$MOONLIGHT_ARG -4k"
else
MOONLIGHT_ARG="$MOONLIGHT_ARG -width $MOON_WIDTH_RESOLUTION -height $MOON_HEIGHT_RESOLUTION"
fi
if [ "$MOON_FRAMERATE" = "60" ]; then
MOONLIGHT_ARG="$MOONLIGHT_ARG -60fps"
MOONLIGHT_ARG="$MOONLIGHT_ARG -fps 60"
else
MOONLIGHT_ARG="$MOONLIGHT_ARG -30fps"
fi
if [ "$MOON_FORCEHW" = "true" ]; then
MOONLIGHT_ARG="$MOONLIGHT_ARG -forcehw"
MOONLIGHT_ARG="$MOONLIGHT_ARG -fps 30"
fi
if [ "$MOON_SURROUND" = "true" ]; then
@ -59,10 +65,6 @@ while [ 1 ]; do
MOONLIGHT_ARG="$MOONLIGHT_ARG -audio $MOON_AUDIO"
fi
if [ "$MOON_MAPPING" != "" ]; then
MOONLIGHT_ARG="$MOONLIGHT_ARG -mapping \"${ADDON_DIR}/share/moonlight/mappings/${MOON_MAPPING}.conf\""
fi
if [ "$MOONLIGHT_APP" != "" ]; then
MOONLIGHT_ARG="$MOONLIGHT_ARG -app \"${MOONLIGHT_APP}\""
fi
@ -78,7 +80,7 @@ while [ 1 ]; do
fi
modprobe snd_bcm2835 || :
echo $MOONLIGHT_ARG >> $ADDON_LOG_FILE
echo "${MOONLIGHT_ARG}" >> ${ADDON_LOG_FILE}
/bin/sh -c "${ADDON_DIR}/bin/moonlight ${MOONLIGHT_ARG} > ${ADDON_LOG_FILE} 2>&1"
rmmod snd_bcm2835 || :
systemctl start kodi

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<settings>
<setting id="MOON_SERVER_IP" type="ipaddress" label="Server IP" default="0.0.0.0"/>
<setting id="MOON_RESOLUTION" type="labelenum" label="Resolution" values="Custom|720p|1080p" default="720p" />
<setting id="MOON_RESOLUTION" type="labelenum" label="Resolution" values="Custom|720p|1080p|4k" default="720p" />
<setting id="MOON_WIDTH_RESOLUTION" type="text" label="Width" visible="eq(-1,0)" default="1366" />
<setting id="MOON_HEIGHT_RESOLUTION" type="text" label="Height" visible="eq(-2,0)" default="768" />
<setting id="MOON_FRAMERATE" type="select" values="30|60" label="FPS" default="30" />
@ -13,6 +13,5 @@
<setting id="MOON_LOCALAUDIO" type="bool" label="Play audio locally" default="false"/>
<setting id="MOON_SURROUND" type="bool" label="Stream 5.1 surround sound (requires GFE 2.7)" default="false"/>
<setting id="MOON_FORCEHW" type="bool" label="Force hardware acceleration" default="true"/>
<setting id="MOON_MAPPING" type="select" label="Control Mapping" values="default|dualshock3|dualshock3alt|dualshock4|rumblepad2|xbox360" default="dualshock4" />
<setting id="MOON_AUDIO" type="text" label="Audio Device" default="sysdefault" />
</settings>
</settings>