Merge pull request #1738 from fewtarius/dev

Fix for small displays.
This commit is contained in:
fewtarius 2023-07-15 19:43:45 -04:00 committed by GitHub
commit 688fa035ad
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

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