Well, in the event that the google bots send some poor future soul who also has problems closing RetroArch with a controller (XBOX 360 controller or otherwise) I will post the AutoHotkey script that I’m using successfully.
There are two hotkeys here. One is triggered by holding down both thumb sticks, the left button (not trigger) and hitting the right button. This one simply exits RetroArch, Mednafen, or Project64 if any of them are currently open. Finally, it forces XBMC to maximize itself since Advanced Launcher fails to re-maximize often.
The second hotkey triggers by holding down back/start/right button and then hitting the left button, and is for all the times when XBMC crashes and won’t maximize (I haven’t figured out why this happens). It kills the XBMC process, and then opens a new instance of it after waiting 3 seconds for the process to close.
#InstallKeybdHook
Joy6::
If GetKeyState("Joy5", "p") && GetKeyState("Joy9", "p") && GetKeyState("Joy10", "p") {
IfWinExist, RetroArch
{
WinKill, RetroArch
WinWaitClose
}
process, exist, mednafen.exe
{
NewPID = %ErrorLevel%
if NewPID = 0
sleep 10
else
Process, Close, %NewPID%
}
process, exist, project64.exe
{
NewPID = %ErrorLevel%
if NewPID = 0
sleep 10
else
Process, Close, %NewPID%
}
NewPID = 0
sleep 1000
WinMaximize, XBMC
}
return
Joy5::
If GetKeyState("Joy6", "p") && GetKeyState("Joy7", "p") && GetKeyState("Joy8", "p") {
process, exist, XBMC.exe
{
NewPID = %ErrorLevel%
if NewPID = 0
sleep 10
else
Process, Close, %NewPID%
}
sleep 3000
run,C:\Program Files\XBMC\XBMC.exe
}
return
Hopefully all of this will still work once I set Windows to boot directly into XBMC instead of Explorer as a shell.