Thanks Thanks:  0

Thread: Citra not closing when exiting from Rocketlauncher

Results 1 to 12 of 12
  1. Collapse Details
    Citra not closing when exiting from Rocketlauncher 
    #1
    Junior Member
    MainSecondary
    Join Date
    May 2017
    Posts
    1
    Contribute If you enjoy reading the
    content here, click the below
    image to support our site.
    Click Here To Contribute To Our Site
    Unhappy
    Nintendo 3ds games opens and plays fine but when escape is pressed the Rocketlauncher fade screen appears and hangs.
    If I press the keyboard windows key and close Citra manually then the Rocketlauncher fade screen closes and Rocketlauncher resumes normally.
    Citra works fine as a stand alone emulator.
    Thanx Steven
     

  2. Collapse Details
    Re: Citra not closing when exiting from Rocketlauncher 
    #2
    Senior Member
    MainSecondary
    Join Date
    Feb 2015
    Posts
    158
    I noticed this today, too. I am new to Citra though, so I don't know if it has always been the case. I did see that there are several different executables for citra, so perhaps the script is looking for the wrong one? I will investigate later.
     

  3. Collapse Details
    Re: Citra not closing when exiting from Rocketlauncher 
    #3
    Super Moderator
    agent47's Avatar
    MainSecondary
    Join Date
    Jan 2016
    Posts
    1,091
    Something must've changed recently then because this definitely wasn't the case a little while ago. I'll look into it when I get a chance if Tomkun doesn't beat me to it.
     

  4. Collapse Details
    Re: Citra not closing when exiting from Rocketlauncher 
    #4
    Senior Member
    MainSecondary
    Join Date
    Feb 2015
    Posts
    158
    I'm at work all day, so I won't have chance to test anything until this evening. I had a goosey over remote desktop and saw that I was using citra-qt as the executable. I've no idea if that's correct or not. I have changed it to citra.exe, but have no way to test it yet. Too bad 3D won't work over RD.
     

  5. Collapse Details
    Re: Citra not closing when exiting from Rocketlauncher 
    #5
    Super Moderator
    agent47's Avatar
    MainSecondary
    Join Date
    Jan 2016
    Posts
    1,091
    I'm at work also but I'm almost positive the qt executable is the correct one. I might try and mess with it when I get home in a few hours, if not tomorrow.
     

  6. Collapse Details
    Re: Citra not closing when exiting from Rocketlauncher 
    #6
    Senior Member
    MainSecondary
    Join Date
    Feb 2015
    Posts
    158
    OK, I figured it out.

    In the latest versions of Citra, there is a fullscreen mode. In the module, which I assume was built for an earlier version, there is a workaround to put it into a fake fullscreen. This hack can now be removed. Try this:

    Code:
    MEmu := "Citra"
    MEmuV := "2016-11-23"
    MURL := ["http://citra-emu.org/"]
    MAuthor := ["djvj","bleasby"]
    MVersion := "1.0.1"
    MCRC := "B2CEA0A2"
    iCRC := "8131AB6F"
    MID := "635740704032217117"
    MSystem := ["Nintendo 3DS"]
    ;---------------------------------------------------------------------------- 
    ; Notes:
    ; Roms must be decrypted to run in the emu
    ; See here for a guide on decrypting games you own: https://gbatemp.net/threads/tutorial-how-to-decrypt-extract-rebuild-3ds-roms-run-xy-oras-without-update.383055/
    ;---------------------------------------------------------------------------- 
    StartModule()
    BezelGUI()
    FadeInStart()
    
    primaryExe := new Emulator(emuPath . "\" . executable)					; instantiate emulator executable object
    primaryWindowClassName := "Qt5QWindowIcon"
    emuPrimaryWindow := new Window(new WindowTitle("Citra",primaryWindowClassName))	; instantiate primary emulator window object
    emuConsoleWindow := new Window(new WindowTitle(,"ConsoleWindowClass"))
    
    Fullscreen := moduleIni.Read("Settings", "Fullscreen","true",,1)
    bezelTopOffset := moduleIni.Read("Settings", "Bezel_Top_Offset","30",,1)
    bezelBottomOffset := moduleIni.Read("Settings", "Bezel_Bottom_Offset","8",,1)
    bezelRightOffset := moduleIni.Read("Settings", "Bezel_Right_Offset", "8",,1)
    bezelLeftOffset := moduleIni.Read("Settings", "Bezel_Left_Offset", "8",,1)
    
    CitraIni := new IniFile(emuPath . "\user\config\qt-config.ini")
    CitraIni.CheckFile("Could not find Citra's ini file. Please run Citra manually first and make sure that you use the module recomended emulator version.")
    
    ; Disabling the emu exit confirmation
    confirmClose := CitraIni.Read("UI", "confirmClose")
    If (confirmClose = "true")
    	CitraIni.Write("false", "UI", "confirmClose")
    
    ; Setting the game to launch on an extra window. 
    singleWindowMode := CitraIni.Read("UI", "singleWindowMode")
    If (singleWindowMode = "true")
    	CitraIni.Write("false", "UI", "singleWindowMode")
    
    BezelStart()
    
    hideEmuObj := Object(emuConsoleWindow,0,emuPrimaryWindow,1)
    
    7z(romPath, romName, romExtension, SevenZExtractPath)
    
    HideAppStart(hideEmuObj,hideEmu)
    primaryExe.Run("""" . romPath . "\" . romName . romExtension . """")
    
    ; Waiting for main emu window
    emuPrimaryWindow.Wait()
    emuPrimaryWindow.WaitActive()
    
    ; Hiding citra console window
    emuConsoleWindow.Set("Transparent",0)
    
    ; Waiting for game to load
    TimeOut := 3000
    StartTime := A_TickCount
    Loop, {
    	WinGet, IDList, List, ahk_class %primaryWindowClassName% ; get a list of all windows which match this windowTitle
    	Loop, % IDList ; IDList set to number of matches found
    	{	id := IDList%A_Index%
    		ControlGet, OutputVar, Hwnd,, Qt5QWindowOwnDCIcon1, ahk_id %id%
    		If !ErrorLevel
    		{	gameWindowID := id
    			Break
    		}
    	}
    	If (TimeOut && A_TickCount - StartTime > TimeOut)
    		Break
    }
    ; Saving id of extra emulator window to be hidden
    WinGet, IDList, List, ahk_class %primaryWindowClassName% ; Get a list of all windows which match this windowTitle
    Loop, % IDList ; IDList set to number of matches found
    {	id := IDList%A_Index%
    	If !(id = gameWindowID) {
    		launchWindowID := id
    		launchWindow := new Window(new WindowTitle(,,,launchWindowID))
    		Break
    	}
    }
    
    ; Hiding extra emulator window
    If (launchWindowID)  {
    	launchWindow.Hide()
    }
    
    ; Waiting for game window to be active if it is not
    gameWindow := new Window(new WindowTitle(,,,gameWindowID))
    gameWindow.WaitActive()
    
    BezelDraw()
    HideAppEnd(hideEmuObj,hideEmu)
    FadeInExit()
    primaryExe.Process("WaitClose")
    7zCleanUp()
    BezelExit()
    FadeOutExit()
    ExitModule()
    
    
    CloseProcess:
    	FadeOutStart()
    	If (launchWindowID)
    		launchWindow.Close()
    	Else
    		gameWindow.Close()
    Return
    
    BezelLabel:
    	disableHideBorder := "true"
    	disableHideTitleBar := "true"
    	disableHideToggleMenu := "true"
    Return
    This will work for citra-qt, providing you have previously set it as fullscreen. Another option will be to use citra.exe, which supports cli and would therefore be much cleaner. I haven't gotten the quit key to work with that at all yet though.
    Last edited by Tomkun ; 12-19-2018 at 01:58 AM.
     

  7. Collapse Details
    Re: Citra not closing when exiting from Rocketlauncher 
    #7
    Super Moderator
    agent47's Avatar
    MainSecondary
    Join Date
    Jan 2016
    Posts
    1,091
    That would explain why I wasn't able to replicate the issue when I got home. I removed the fullscreen hack back when fullscreen support was added to Citra.

    I added a bunch of features and stuff to mine so I wasn't looking forward to comparing it to the old one to figure out what was causing it, so thanks for saving me from that
     

  8. Collapse Details
    Re: Citra not closing when exiting from Rocketlauncher 
    #8
    Senior Member
    MainSecondary
    Join Date
    Feb 2015
    Posts
    158
    No problem, although this module obviously still needs some work. I'd like to transfer it over to the Citra.exe rather than Citra-qt.exe. They have the same functionality, but Citra.exe supports the command line, so we can put in a lot more options.
     

  9. Collapse Details
    Re: Citra not closing when exiting from Rocketlauncher 
    #9
    Super Moderator
    agent47's Avatar
    MainSecondary
    Join Date
    Jan 2016
    Posts
    1,091
    Unless it's been changed in recent versions the only useful command line arg for the citra exe is fullscreen. For any other functionality like screen layout you still had to write to the ini (SDL.ini instead of qt IIRC) like I'm currently doing in my module. The window class is different and you have to hide the console window when using citra.exe unlike qt, which is easy.

    From what I remember the citra exe did start slightly faster but the exiting wasn't as smooth as qt.

    I'll look into it before I post my Citra module and all my other modules (no ETA) but I think using the qt executable will still be the way to go unless those things have changed since I last looked at it.
     

  10. Collapse Details
    Re: Citra not closing when exiting from Rocketlauncher 
    #10
    Senior Member
    MainSecondary
    Join Date
    Feb 2015
    Posts
    158
    Well, if that's the case, then it sounds like your module is the way to go. Would you be kind enough to post it?
     

  11. Collapse Details
    Re: Citra not closing when exiting from Rocketlauncher 
    #11
    Super Moderator
    agent47's Avatar
    MainSecondary
    Join Date
    Jan 2016
    Posts
    1,091
    From what I recall there are still some things I need to test first. When I get around to testing that I'll post it with all my other updated and new ones in a thread and pin it so people don't have to go rummaging through threads to find them.

    I might try to work on them over the holidays but no guarantees.
     

  12. Collapse Details
    Re: Citra not closing when exiting from Rocketlauncher 
    #12
    Senior Member
    MainSecondary
    Join Date
    Feb 2015
    Posts
    158
    Well, I got the fullscreen working with QT now. That should do me for now at least. Here it is if anyone wants it:

    Code:
    MEmu := "Citra"
    MEmuV := "2016-11-23"
    MURL := ["http://citra-emu.org/"]
    MAuthor := ["djvj","bleasby"]
    MVersion := "1.0.1"
    MCRC := "B2CEA0A2"
    iCRC := "8131AB6F"
    MID := "635740704032217117"
    MSystem := ["Nintendo 3DS"]
    ;---------------------------------------------------------------------------- 
    ; Notes:
    ; Roms must be decrypted to run in the emu
    ; See here for a guide on decrypting games you own: https://gbatemp.net/threads/tutorial-how-to-decrypt-extract-rebuild-3ds-roms-run-xy-oras-without-update.383055/
    ;---------------------------------------------------------------------------- 
    StartModule()
    BezelGUI()
    FadeInStart()
    
    primaryExe := new Emulator(emuPath . "\" . executable)					; instantiate emulator executable object
    primaryWindowClassName := "Qt5QWindowIcon"
    emuPrimaryWindow := new Window(new WindowTitle("Citra",primaryWindowClassName))	; instantiate primary emulator window object
    emuConsoleWindow := new Window(new WindowTitle(,"ConsoleWindowClass"))
    
    Fullscreen := moduleIni.Read("Settings", "Fullscreen","true",,1)
    bezelTopOffset := moduleIni.Read("Settings", "Bezel_Top_Offset","30",,1)
    bezelBottomOffset := moduleIni.Read("Settings", "Bezel_Bottom_Offset","8",,1)
    bezelRightOffset := moduleIni.Read("Settings", "Bezel_Right_Offset", "8",,1)
    bezelLeftOffset := moduleIni.Read("Settings", "Bezel_Left_Offset", "8",,1)
    
    CitraIni := new IniFile(emuPath . "\user\config\qt-config.ini")
    CitraIni.CheckFile("Could not find Citra's ini file. Please run Citra manually first and make sure that you use the module recomended emulator version.")
    
    ; Disabling the emu exit confirmation
    confirmClose := CitraIni.Read("UI", "confirmClose")
    If (confirmClose = "true")
    	CitraIni.Write("false", "UI", "confirmClose")
    
    ; Setting the game to launch on an extra window. 
    singleWindowMode := CitraIni.Read("UI", "singleWindowMode")
    If (singleWindowMode = "true")
    	CitraIni.Write("false", "UI", "singleWindowMode")
    
    BezelStart()
    
    hideEmuObj := Object(emuConsoleWindow,0,emuPrimaryWindow,1)
    
    7z(romPath, romName, romExtension, SevenZExtractPath)
    
    if Fullscreen=true
    	CitraIni.Write("true", "UI", "fullscreen")
    if Fullscreen=false
    	CitraIni.Write("false", "UI", "fullscreen")
    
    HideAppStart(hideEmuObj,hideEmu)
    primaryExe.Run("""" . romPath . "\" . romName . romExtension . """")
    
    ; Waiting for main emu window
    emuPrimaryWindow.Wait()
    emuPrimaryWindow.WaitActive()
    
    ; Hiding citra console window
    emuConsoleWindow.Set("Transparent",0)
    
    ; Waiting for game to load
    TimeOut := 3000
    StartTime := A_TickCount
    Loop, {
    	WinGet, IDList, List, ahk_class %primaryWindowClassName% ; get a list of all windows which match this windowTitle
    	Loop, % IDList ; IDList set to number of matches found
    	{	id := IDList%A_Index%
    		ControlGet, OutputVar, Hwnd,, Qt5QWindowOwnDCIcon1, ahk_id %id%
    		If !ErrorLevel
    		{	gameWindowID := id
    			Break
    		}
    	}
    	If (TimeOut && A_TickCount - StartTime > TimeOut)
    		Break
    }
    ; Saving id of extra emulator window to be hidden
    WinGet, IDList, List, ahk_class %primaryWindowClassName% ; Get a list of all windows which match this windowTitle
    Loop, % IDList ; IDList set to number of matches found
    {	id := IDList%A_Index%
    	If !(id = gameWindowID) {
    		launchWindowID := id
    		launchWindow := new Window(new WindowTitle(,,,launchWindowID))
    		Break
    	}
    }
    
    ; Hiding extra emulator window
    If (launchWindowID)  {
    	launchWindow.Hide()
    }
    
    ; Waiting for game window to be active if it is not
    gameWindow := new Window(new WindowTitle(,,,gameWindowID))
    gameWindow.WaitActive()
    
    BezelDraw()
    HideAppEnd(hideEmuObj,hideEmu)
    FadeInExit()
    primaryExe.Process("WaitClose")
    7zCleanUp()
    BezelExit()
    FadeOutExit()
    ExitModule()
    
    
    CloseProcess:
    	FadeOutStart()
    	If (launchWindowID)
    		launchWindow.Close()
    	Else
    		gameWindow.Close()
    Return
    
    BezelLabel:
    	disableHideBorder := "true"
    	disableHideTitleBar := "true"
    	disableHideToggleMenu := "true"
    Return
     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •