Jump to content
LaunchBox Community Forums

CEMU Exit Command Line


Recommended Posts

Go to tools -> Manage emulator, select your Cemu emulator and add the the following to the Running AutoHotKey Script tab:

$Esc::
{
    Process, Close, {{{StartupEXE}}}
} 

Add the following to the Exit AutoHotKey Script tab:
 

Process, Close, {{{StartupEXE}}}

 

Link to post
Share on other sites

I would recommend using a different version of that code. That old version is a hard close and can cause issues with emulators not saving save states properly. It was something that was found last year. I would use the code below instead. Not that the prior one did not work, this is just a cleaner shutdown process.

$Esc::
{
   WinClose, ahk_exe {{{StartupEXE}}}
}

 

Link to post
Share on other sites
  • 5 weeks later...

Hey, All

So I updated Cemu to 1.18.2 and launchbox to 10.14 and now I can't get Cemu to close with my Xbox controller. I use the select button + start button to close all my emulators and Cemu is the only one to stop working.

I have

 $Esc::
{
    Process, Close, {{{StartupEXE}}}
}

for my AHS

and 

Process, Close, {{{StartupEXE}}}

for my close script.

I've tried a bunch of other scripts with no luck thus far. Any ideas?

I also don't have cemu running in administrative mode  because that disabled my esc command to close out with a keyboard.

 

Link to post
Share on other sites

@Jake612

CEMU uses Alt-F4 to close in standalone mode.  So this is what I use and this works on current versions of CEMU and LB:

In the CEMU Emulator Tab  "Exit AutoHotkey Script" put this in:

Send !{f4}   

The above will work in the Pause Screen exit command as well as whatever controller combination you set up in LB for exit game.  The "Process Close" AHKs given in the past have been found to not always be reliable.  Plus, the Alt-F4 is what CEMU expects as normal exit anyway. 

Optional:  If you also want to use the keyboard Escape key to exit then optionally add this in the "Running AutoHotkey Script" tab:

ESC::
{   
    SetTitleMatchMode, 2
    WinWaitActive, Cemu
    Send !{f4}               
}

You shouldn't need to run CEMU in admin mode for either of these or really any reason I can think of at least for BB/LB usage.

Edited by sundogak
  • Thanks 1
Link to post
Share on other sites
16 minutes ago, sundogak said:

@Jake612

CEMU uses Alt-F4 to close in standalone mode.  So this is what I use and this works on current versions of CEMU and LB:

In the CEMU Emulator Tab  "Exit AutoHotkey Script" put this in:


Send !{f4}   

The above will work in the Pause Screen exit command as well as whatever controller combination you set up in LB for exit game.  The "Process Close" AHKs given in the past have been found to not always be reliable.  Plus, the Alt-F4 is what CEMU expects as normal exit anyway. 

Optional:  If you also want to use the keyboard Escape key to exit then optionally add this in the "Running AutoHotkey Script" tab:


ESC::
{   
    SetTitleMatchMode, 2
    WinWaitActive, Cemu
    Send !{f4}               
}

You shouldn't need to run CEMU in admin mode for either of these or really any reason I can think of at least for BB/LB usage.

Thank you for the response!

My computer restarted and it magically worked again without me doing anything. No idea why but I'm not complaining.

Link to post
Share on other sites
  • 8 months later...

Sorry that this topic is old and I'm replying to it now.  I tried all of the above proposed solutions and couldn't get any of them to work.  I can press Alt + F4 on my keyboard to close Cemu but I can't get the emulator to close from my wireless Xbox 360 controller.  LIke a poster above, I also press Start + Select to exit all other emulators like RetroArch.  But pressing those buttons on the controller when using Cemu does nothing but bring up a menu in the game.  Does anyone know how to can get the Cemu emulator to close by pressing start and select at the same time on my controller when the emulator is launched from within Launchbox/Bigbox?  Any help is appreciated.

UPDATE:

Figured it out.  Just had to set cemu.exe to NOT run as administrator and remove everything from the running and exit scripts.

Edited by djdaveoc22
Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...