Jump to content
LaunchBox Community Forums

Cemu Closing Questions


JD78

Recommended Posts

On 12/14/2023 at 6:35 AM, Retro808 said:

So definitely something changed in the newer exp builds. Seems like you cannot use any shortcuts to close Cemu. You can jump in/out of fullscreen a bunch of different ways, but nothing for closing. 

Did some testing and the AHK below definitely works. I am no guru with this but it was something I had in my AHK notes from either something someone helped me with or I found a while back and just modified it for this use. So I cannot take any credit for it other than tinkering with it.  

SetTitleMatchMode, 2
Esc::PostMessage, 0x0112, 0xF060,,, Cemu

 

This worked for me on the 2.0-61 build. Thanks for this, it was literally the only thing keeping me from playing one of my old favs on the big screen :D

@Oniontears Be sure you are setting the script as running script in LB and it should work just fine in both LB and BB.

Edited by elwooha6
  • Like 1
Link to comment
Share on other sites

1 hour ago, elwooha6 said:

This worked for me on the 2.0-61 build. Thanks for this, it was literally the only thing keeping me from playing one of my old favs on the big screen :D

@Oniontears Be sure you are setting the script as running script in LB and it should work just fine in both LB and BB.

Finally! Something that worked.

Thanks! @elwooha6 

rcy2rga2u3a61.jpg

Edited by Oniontears
Link to comment
Share on other sites

On 1/13/2024 at 6:20 PM, Oniontears said:

I tested all the scripts and it works on LB mode, but on BB using a controller and a PausePie theme gives me the screen attached, any way to fix that?

cemu-pause-menu.png

@elwooha6 Oh man WTF this damn screen keeps coming back, that script you gave me just worked once. Any ideas? Do I need to run Cemu as admin for this to work?

Link to comment
Share on other sites

@Oniontears
Hmm, I feel like I've seen that before but I can't remember why. Does it do this for every game in cemu or just the one? Also the only reason you'd ever need to run an emulator as admin is if it were installed in a protected folder like Program Files or something, which most emulators avoid these days.

Also have you changed any other settings for the emulator since it worked?

Edited by elwooha6
Link to comment
Share on other sites

16 hours ago, elwooha6 said:

@Oniontears
Hmm, I feel like I've seen that before but I can't remember why. Does it do this for every game in cemu or just the one? Also the only reason you'd ever need to run an emulator as admin is if it were installed in a protected folder like Program Files or something, which most emulators avoid these days.

Also have you changed any other settings for the emulator since it worked?

Ok I tested several times with one game, and different games, both on LB and BB, it seem to occour randomly, most of the time the screen appear. What I can think of I changed on Cemu settings was starting full screen, and remember window position, but I turned off and it didn't help. My Cemu is on an external SSD, so don't need to run as admin then.

I also tried to change my controller combo to bring up the pause screen, thinking it could be some kind of conflict, but it didn't help either. This just happens with Cemu, I think started with one of the lasts updates, I also changed the pause screen theme, could be this?

Just remembering, this happens when I try to exit the game through the pause screen (for now exiting pressing esc on the keyboard allways works), I don't have a key bind on my controller to close active window.

Edited by Oniontears
Link to comment
Share on other sites

@Oniontears
Ok, figured it out. In Cemu disable the option to remember main window position. I think when you exit through the pause menu it forces cemu to close before it registers its window position and that causes the error to pop up. I enabled it and tried and immediately got the error, disabled it and the problem went away.

  • Thanks 1
Link to comment
Share on other sites

3 hours ago, elwooha6 said:

@Oniontears
Ok, figured it out. In Cemu disable the option to remember main window position. I think when you exit through the pause menu it forces cemu to close before it registers its window position and that causes the error to pop up. I enabled it and tried and immediately got the error, disabled it and the problem went away.

Thanks, I was actually looking to enable that feature because I want the window to remain maximised.

Link to comment
Share on other sites

On 1/17/2024 at 8:57 AM, elwooha6 said:

@Oniontears
Ok, figured it out. In Cemu disable the option to remember main window position. I think when you exit through the pause menu it forces cemu to close before it registers its window position and that causes the error to pop up. I enabled it and tried and immediately got the error, disabled it and the problem went away.

Didn't work for me.

Edited by Oniontears
Link to comment
Share on other sites

the scripts I posted still work fine

for some unknown magical reason because I've changed literally NOTHING since my last posts regarding the frontend or CEMU, or really anything about my PC, but "close active window" controller binding works perfectly fine again for me. I'll admit that is bizarre. for what it's worth I map it as the first button to be the start button and the second button to be the B button. 

for the record checking/unchecking remembering window position has nothing to do with that error. I never use it and I was able to create the same error when I was troubleshooting this last month, but it was completely, 100%, random.  Having it checked now does not make the error get thrown. When it did happen to me I found no rhyme or reason why it occurred but it only occurred for me when using the close active window controller binding/hotkey. but to be clear, it was totally random, it did not happen every time close active window via controller was used. It definitely did not occur when using the keyboard. this was the reason why I posted the script to close the emulator via double clicking the guide button. it was the first workaround that came to my mind at that point in time.

my running script is still the same as I posted last time, and the exit script (ie exiting via the Pause Screen) is the same thing but written appropriately for the Pause Screen Exit Script field. still works fine for me.

WinClose, ahk_exe {{{StartupEXE}}}

 

Hey @Retro808, would you mind firing up CEMU and see if closing it via the controller close active window bind misbehavior changed for you too? This is weird.....it somehow fixed itself for me lol.....I mean....this is a good problem to be having 😄

Link to comment
Share on other sites

1 hour ago, Retro808 said:

@skizzosjt Same thing here that you are seeing. Close Active Window binding works without issue. Using the same AHK in Pause Screen exits fine as well.  

thank you for checking! maybe some magic Christmas PC tech elves paid us a visit over the holiday or what lol. there were some recent Windows 10 updates but even that is quite a stretch to think that would somehow be connected to this getting fixed back to normal. I'll take the win as is since it just landed in our laps like this

Link to comment
Share on other sites

Well, I think I tried everything. I attempt to downgrade Cemu, didn't work either.

@skizzosjt Since this problem magically appeared after the latest Launchbox and Cemu updates, I guess I'll have to wait for the problem to magically go away at some point.

Edited by Oniontears
Link to comment
Share on other sites

Did some testing this morning and was able to recreate the Unhandled Exception error.

My Setup:

  • Controller
    • Wireless Xbox 360
  • Cemu 2.0-65
    • Remember main window position un-checked 
  • Emulator settings (LaunchBox)
    • Default Command-line Parameters "-f -g" (without quotes)
    • Running Script:  Esc::WinClose, ahk_exe {{{StartupEXE}}}
    • Exit Script: blank (as in empty. Nothing there)
  • LaunchBox and BigBox (mapped separately)
    • Pause: Button6 (Back)

What did work (No error in LaunchBox and BigBox)

  • Exiting the with Escape (keyboard).  Which is lame because who plays Wii-U with a keyboard?
  • Exiting the game from the Pause Menu.

Mapping the button-combo Exit Game (LaunchBox) and Close the Active Window (BigBox) to Button7 (Right Shoulder) + Button6 (Back) [note the order]

  • Exits using the button-combo.  (LB & BB)

 

What didn't work (Unhandled Exception error)  mapping a controller button-combo to exit

If I mapped my controller Exit Game (LB) and Close the Active Window (BB) to Button6 (Back) + Button7 (Right Shoulder) [reversed from above], pressing them (in that order) it would go to the Game Pause Screen. (NOT exit the game).  Select Exit from the Pause Menu would throw the error.  Clicking any of the 3 buttons (via mouse) in the message box would close it and exit the game.

Theory being, don't bind Exit Game and Close the Active Window with the Back ('Pause') button 1st.  However this theory is thrown out when @Oniontears said he didn't have Close Active Window bound to anything.

Note: Entering the Pause Menu 'normally' and then selecting Exit Game from there [still] worked in this scenario without issue.

 

What made didn't work turn into did work (using Button6 + Button7 [in that order])

  • Disable the Game Pause Screen.

But I was able to "brake it" by pressing Button6 + Button7+Button7 (hold 6 and double tap 7).  Causing the Unhandled Exception error to appear.

 

 

Last test ('experiment')

Remove controller mapping for Exit Game (LB) and Close the Active Window (BB) altogether.  (Which sucks because you most likely want those for all other emulators)

Put in the Running Script:

; Needed to exit with Escape AND when exiting from Pause
Esc::WinClose, ahk_exe {{{StartupEXE}}}

; Left Shoulder (5) THEN Right Shoulder (6)
1Joy6::
   If GetkeyState("Joy5")
      WinClose, ahk_exe {{{StartupEXE}}}

The Exit Script is still blank and the Game Pause Screen is enabled.

This worked in both LB and BB.  Button-combo, Escape and Exit Game from the Pause Menu.  But the button combo is scary because if you're playing some intense game and 'smashing buttons', you'll likely exit the game.

 

Take away:

  • When mapping a button-combo to exit the game and it doesn't work, try reversing the combo.
    • ..and you must press the buttons in 'that' order
  • Same is probably true for a button-combo mapped for anything else (like Pause).
  • If the combo works sometimes and error other, watch the caffeine intake and careful the double-tap.
  • Get creative and map (or script) different button combos.  Experiment a little.
  • Try not to use the 'Pause' button when mapping the Exit Game combo.  (or use with caution)
  • Anything else you can discern from my ramblings.

 

Observation: if the "Esc::" escape sequence is in the Running Script, the game will Exit from the Pause Menu's Exit Game even with the Exit Script section being blank.  Conversely, if it's not in the Running Script (and Exit Script is still blank), it won't.  Unless you add to the Exit Script "WinClose, ahk_exe {{{StartupEXE}}}" (without quotes).

  • Like 1
Link to comment
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
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
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...