JNES keeps running in background and freezes mGalaxy

Get answers to questions about using mGalaxy.
Post Reply
jzeitlerj
Newbie
Newbie
Posts: 10
Joined: Sun Mar 03, 2019 2:31 pm

Hi,
Does anyone know how to get JNES to close when I exit a game from mgalaxy.  It appears to keep running in background and freezes mgalaxy.  I can see the game again when I exit mgalaxy.  I am running the version 6 since I couldn't get 7.1 to load.  Thank you
Aeliss
Hero Member
Hero Member
Posts: 900
Joined: Thu Apr 04, 2013 5:55 pm

I have trying this emulator.

And yes, there is a bug on my version, on the script "Nestopia, JNES, VirtuaNES, FCEUX, NNNester [Script].au3" in mGalaxy\Data\Scripts folder

Code: Select all

HotKeySet("{ESC}", "Terminate")

Runwait ( '"' & $app & '" ' & $command )

Exit 0

;Functions
Func Terminate()
   WinClose ( "VirtuaNES")
   Exit 0
EndFunc
it can work only with VirtuaNES.

So edit the file and add

Code: Select all

;Functions
Func Terminate()
   WinClose ( "VirtuaNES")
   WinClose ( "Jnes")
   Exit 0
EndFunc
jmd
Full Member
Full Member
Posts: 204
Joined: Mon Feb 05, 2007 2:33 pm

Right...well seen Aeliss!
You can use the 'standard' close script:

Code: Select all

HotKeySet("{ESC}", "Terminate")

$PID = Run ('"' & $app & '" ' & $command)

While ProcessExists ( $PID )
   sleep(500)
WEnd

Exit 0

;functions
Func Terminate()
   While ProcessExists ( $PID )
	  ProcessClose ( $PID )
   WEnd
   Exit 0
EndFunc
Aeliss
Hero Member
Hero Member
Posts: 900
Joined: Thu Apr 04, 2013 5:55 pm

Yep ProcessClose is better, more universal.

Realy few applications have problems with it.
Post Reply