mirror of
https://github.com/EliasKotlyar/Xiaomi-Dafang-Hacks.git
synced 2025-09-09 07:30:57 +02:00
Fixed OSD display (#1015)
This commit is contained in:
@@ -2,17 +2,17 @@
|
||||
|
||||
## Get OSD-Information
|
||||
if [ -f /system/sdcard/config/osd.conf ]; then
|
||||
source /system/sdcard/config/osd.conf 2>/dev/null
|
||||
. /system/sdcard/config/osd.conf > /dev/null 2>/dev/null
|
||||
AXIS=""
|
||||
# Call setconf only if we have something to set, to avoid outputing error messages
|
||||
[ ${DISPLAY_AXIS} ] && AXIS=`/system/sdcard/bin/motor -d u -s 0 | tail +5 | awk '{printf ("%s ",$0)}' | awk '{print "X="$2,"Y="$4}'` && OSD=$(echo ${OSD} | sed -r "s/X=.*$/${AXIS}/")
|
||||
[ ! -z "${OSD}" ] && /system/sdcard/bin/setconf -k o -v "${OSD}" 2>/dev/null
|
||||
[ "${DISPLAY_AXIS}" = true ] && AXIS=$(/system/sdcard/bin/motor -d s | sed '3d' | awk '{printf ("%s ",$0)}' | awk '{print " X="$2,"Y="$4}')
|
||||
[ "${ENABLE_OSD}" = true ] && /system/sdcard/bin/setconf -k o -v "${OSD}${AXIS}" 2>/dev/null
|
||||
[ ! -z "${COLOR}" ] && /system/sdcard/bin/setconf -k c -v ${COLOR} 2>/dev/null
|
||||
[ ! -z "${SIZE}" ] && /system/sdcard/bin/setconf -k s -v ${SIZE} 2>/dev/null
|
||||
[ ! -z "${POSY}" ] && /system/sdcard/bin/setconf -k x -v ${POSY} 2>/dev/null
|
||||
[ ! -z "${FIXEDW}" ] && /system/sdcard/bin/setconf -k w -v ${FIXEDW} 2>/dev/null
|
||||
[ ! -z "${SPACE}" ] && /system/sdcard/bin/setconf -k p -v ${SPACE} 2>/dev/null
|
||||
[ ! -z "${FONTNAME}" ] && /system/sdcard/bin/setconf -k e -v ${FONTNAME} 2>/dev/null
|
||||
|
||||
else
|
||||
/system/sdcard/bin/setconf -k o -v ""
|
||||
fi
|
||||
|
Reference in New Issue
Block a user