Thanks Thanks:  0

Thread: Citra not closing when exiting from Rocketlauncher

Results 1 to 8 of 8
  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
    156
    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,011
    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
    156
    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,011
    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
    156
    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 ; Today at 02: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,011
    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
    156
    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.
     

Posting Permissions

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