distribution/packages/jelos/sources/scripts/batocera-resolution
2022-02-05 09:23:32 -05:00

18 lines
363 B
Bash
Executable file

#!/bin/bash
ACTION=$1
shift
FILEMODES="/sys/class/graphics/fb0/modes"
case "${ACTION}" in
"listModes")
;;
"setMode")
;;
"currentMode"|"currentResolution")
# mode can be different from resolution (ie on rpi)
test -e "${FILEMODES}" && head -1 "${FILEMODES}" | sed -e s+'^[^:]:\([0-9]*\)x\([0-9]*\)[a-z]*.*$'+'\1x\2'+
;;
esac
exit 0