Hi there!
Using my RPi for multiple purposes, i used your standalone instead of the full img.
But while in “working mode” i use keyboard or at least ssh, when in “gaming mode” i prefear to take just the RPi, power cable and a few ps4 controllers to my buddie’s places.
Therefor i started looking at bash script & co. and found my way with a really quick and easy solution, it launches emulationstation only if a pad is plugged (and check to do it only once or else with every ssh connections this would be launched again). if not, stays on the classic RPi boot.
Dunno if it can help someone but there it is (in case the devs would want to implement an option to their scripts).
Enjoy ^^
lowlow@RPiStation:~ $ cat /etc/profile.d/AutoLaunch.sh
#!/bin/bash
if [ "users | wc -w" -eq 1 ]; then
if [ -e /dev/input/js0 ]; then
exec "emulationstation" # Launch Gaming platform if a controller is plugged
fi
fi