Deprecate and remove older splash method.
This commit is contained in:
parent
bb4b03b1ec
commit
242d6ea657
4 changed files with 33 additions and 59 deletions
|
@ -9,38 +9,24 @@
|
|||
|
||||
SPLASH_TYPE="$1"
|
||||
|
||||
hres="$(fbset 2>/dev/null | awk '/geometry/ { print $2 }')"
|
||||
vres="$(fbset 2>/dev/null | awk '/geometry/ { print $3 }')"
|
||||
rotation="$(cat /sys/devices/virtual/graphics/fbcon/rotate)"
|
||||
|
||||
if [ "${SPLASH_TYPE}" == "intro" ] || [ "${SPLASH_TYPE}" == "exit" ]
|
||||
then
|
||||
if [ ${vres} -gt ${hres} ] && \
|
||||
[ -e "/usr/config/splash/splashl.png" ]
|
||||
then
|
||||
### When we have a device specific splash
|
||||
SPLASH="/usr/config/splash/splashl.png"
|
||||
elif [ ! -e "/usr/config/splash/splashl.png" ]
|
||||
then
|
||||
### When we don't define a splash
|
||||
case ${rotation} in
|
||||
0)
|
||||
SPLASH="/usr/config/splash/splash.png"
|
||||
;;
|
||||
1)
|
||||
SPLASH="/usr/config/splash/splash_90.png"
|
||||
;;
|
||||
2)
|
||||
SPLASH="/usr/config/splash/splash_180.png"
|
||||
;;
|
||||
3)
|
||||
SPLASH="/usr/config/splash/splash_270.png"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
### When we don't know what to do.
|
||||
SPLASH="/usr/config/splash/splash.png"
|
||||
fi
|
||||
case ${rotation} in
|
||||
0)
|
||||
SPLASH="/usr/config/splash/splash.png"
|
||||
;;
|
||||
1)
|
||||
SPLASH="/usr/config/splash/splash_90.png"
|
||||
;;
|
||||
2)
|
||||
SPLASH="/usr/config/splash/splash_180.png"
|
||||
;;
|
||||
3)
|
||||
SPLASH="/usr/config/splash/splash_270.png"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
exit 0
|
||||
fi
|
||||
|
|
|
@ -483,37 +483,23 @@ load_splash() {
|
|||
|
||||
# Select splash image based on current native resolution
|
||||
if [ -z "${SPLASHIMAGE}" ]; then
|
||||
vres="$(fbset 2>/dev/null | awk '/geometry/ { print $3 }')"
|
||||
hres="$(fbset 2>/dev/null | awk '/geometry/ { print $2 }')"
|
||||
rotation="$(cat /sys/devices/virtual/graphics/fbcon/rotate)"
|
||||
|
||||
# Test to determine if the display is rotated
|
||||
# and set the splash to suit.
|
||||
if [ ${vres} -gt ${hres} ] && \
|
||||
[ -e "/splash/splashl.png" ]
|
||||
then
|
||||
SPLASHIMAGE="/splash/splashl.png"
|
||||
elif [ ! -e "/splash/splashl.png" ]
|
||||
then
|
||||
### When we don't define a splash
|
||||
case ${rotation} in
|
||||
0)
|
||||
SPLASHIMAGE="/splash/splash.png"
|
||||
;;
|
||||
1)
|
||||
SPLASHIMAGE="/splash/splash_90.png"
|
||||
;;
|
||||
2)
|
||||
SPLASHIMAGE="/splash/splash_180.png"
|
||||
;;
|
||||
3)
|
||||
SPLASHIMAGE="/splash/splash_270.png"
|
||||
;;
|
||||
esac
|
||||
else
|
||||
### When we don't know what to do.
|
||||
SPLASHIMAGE="/splash/splash.png"
|
||||
fi
|
||||
### When we don't define a splash
|
||||
case ${rotation} in
|
||||
0)
|
||||
SPLASHIMAGE="/splash/splash.png"
|
||||
;;
|
||||
1)
|
||||
SPLASHIMAGE="/splash/splash_90.png"
|
||||
;;
|
||||
2)
|
||||
SPLASHIMAGE="/splash/splash_180.png"
|
||||
;;
|
||||
3)
|
||||
SPLASHIMAGE="/splash/splash_270.png"
|
||||
;;
|
||||
esac
|
||||
|
||||
fi
|
||||
|
||||
|
|
|
@ -33,7 +33,9 @@ mksplash() {
|
|||
else
|
||||
convert ${SPLASH} -quality 100 -background black -resize ${SPLASH_RESOLUTION} -gravity center -extent ${SPLASH_RESOLUTION} ${1}/splash.png
|
||||
fi
|
||||
convert ${SPLASH} -rotate 270 -quality 100 -background black -resize ${SPLASH_RESOLUTION} -gravity center -extent ${SPLASH_RESOLUTION} ${1}/splashl.png
|
||||
convert ${SPLASH} -rotate 90 -quality 100 -background black -resize ${SPLASH_RESOLUTION} -gravity center -extent ${SPLASH_RESOLUTION} ${1}/splash_90.png
|
||||
convert ${SPLASH} -rotate 180 -quality 100 -background black -resize ${SPLASH_RESOLUTION} -gravity center -extent ${SPLASH_RESOLUTION} ${1}/splash_180.png
|
||||
convert ${SPLASH} -rotate 270 -quality 100 -background black -resize ${SPLASH_RESOLUTION} -gravity center -extent ${SPLASH_RESOLUTION} ${1}/splash_270.png
|
||||
else
|
||||
cp ${SPLASH} ${1}
|
||||
convert ${SPLASH} -rotate 90 -quality 100 -background black -gravity center ${1}/splash_90.png
|
||||
|
|
|
@ -60,7 +60,7 @@ fi
|
|||
|
||||
# Clean OS specific packages.
|
||||
PKG_CLEAN="${PKG_CLEAN} system-utils plymouth-lite initramfs busybox linux grub u-boot SDL2 modules \
|
||||
emulationstation retroarch lib32 splash jelos"
|
||||
emulationstation retroarch lib32 autostart splash jelos"
|
||||
|
||||
if [ ! -n "${DIRTY}" ]
|
||||
then
|
||||
|
|
Loading…
Reference in a new issue