mirror of
https://github.com/archr-linux/Arch-R.git
synced 2026-03-31 14:41:55 -07:00
Fix mpv resolution
Aspect ratio calculation resulted in 0.00 on RG28xx which lead to the wrong resolution being set. Direct comparision between values simplifies the code as well.
This commit is contained in:
@@ -10,16 +10,11 @@ systemctl start mpv
|
||||
FBWIDTH="$(fbwidth)"
|
||||
FBHEIGHT="$(fbheight)"
|
||||
|
||||
ASPECT=$(printf "%.2f" $(echo "(${FBWIDTH} / ${FBHEIGHT})" | bc -l))
|
||||
|
||||
case ${ASPECT} in
|
||||
1.*)
|
||||
RES="${FBWIDTH}x${FBHEIGHT}"
|
||||
;;
|
||||
0.*)
|
||||
RES="${FBHEIGHT}x${FBWIDTH}"
|
||||
;;
|
||||
esac
|
||||
if [[ ${FBWIDTH} -ge ${FBHEIGHT} ]]; then
|
||||
RES="${FBWIDTH}x${FBHEIGHT}"
|
||||
else
|
||||
RES="${FBHEIGHT}x${FBWIDTH}"
|
||||
fi
|
||||
|
||||
/usr/bin/mpv --fullscreen --geometry=${RES} --hwdec=auto-safe --input-gamepad=yes --input-ipc-server=/tmp/mpvsocket "${1}"
|
||||
systemctl stop mpv
|
||||
|
||||
Reference in New Issue
Block a user