#!/bin/sh
# This should replaced by storing the correct PID before 
# launching an emulator and signaling only this one.


if [[ -f /mnt/.assembly_tests ]]; then
	# First this one
	killall -s USR1 assembly_tests > /dev/null 2>&1

	# Then this one
	killall -s USR1 funkey_prod_screens > /dev/null 2>&1
fi

# Send signal to all PCSX first (time critical)
killall -s USR1 pcsx > /dev/null 2>&1

# Send signal to all other emulators
killall -s USR1 gpsp psnes sdlgnuboy PicoDrive mednafen fceux > /dev/null 2>&1

# Send signal to launcher
killall -s USR1 retrofe > /dev/null 2>&1

exit 0
