Fix for small displays.

This commit is contained in:
fewtarius 2023-07-15 23:43:20 +00:00
parent cbc4c28722
commit 28fdff65f3
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A

View file

@ -6,12 +6,25 @@
jslisten set "-9 gmu.bin"
GMUCONFIG="/storage/.config/gmu/gmu.conf"
GMUPATH="/storage/.config/gmu"
GMUCONFIG="${GMUPATH}/gmu.conf"
FBHEIGHT=$(fbset | awk '/geometry/ {print $2}')
FBWIDTH=$(fbset | awk '/geometry/ {print $3}')
if [ ! -d "${GMUPATH}" ]
then
cp -rf /usr/config/gmu ${GMUPATH}
fi
sed -i "s~SDL.Height=.*\$~SDL.Height=${FBHEIGHT}~g" ${GMUCONFIG}
sed -i "s~SDL.Width=.*\$~SDL.Height=${FBWIDTH}~g" ${GMUCONFIG}
sed -i "s~SDL.Width=.*\$~SDL.Width=${FBWIDTH}~g" ${GMUCONFIG}
if (( ${FBWIDTH} <= 800 ))
then
sed -i "s~default-modern-large~default-modern~g" ${GMUCONFIG}
sed -i "s~SDL.Fullscreen=.*\$~SDL.Fullscreen=no~g" ${GMUCONFIG}
fi
cd /usr/local/share/gmu
/usr/local/bin/gmu.bin -d /usr/local/etc/gmu -c /storage/.config/gmu/gmu.conf