when applying the nespi case's safe shutdown script, the gamepad causes the system to lock when mapped by pressing one of the buttons, it stays on that black screen named recalbox / system version / data. Check out this bug, please believe that the same happens with the script of the superpi.ambos of retroflag.
raspberry pi 3B plus
recalbox beta February (the latest)
Nespi case + (retroflag)
control (xbox 360)