Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- MEmu := "yuzu"
- MEmuV := "20180203-1a8f5bf"
- MURL := ["https://github.com/yuzu-emu/yuzu"]
- MAuthor := ["djvj","bleasby","tonesmalone"]
- MVersion := "1.0"
- MCRC := "9EF66675"
- iCRC := "86DE2C7A"
- MID := "635038268916444338"
- MSystem := ["Nintendo Switch"]
- ;----------------------------------------------------------------------------
- ; Notes:
- ; GitHub: https://github.com/yuzu-emu/yuzu
- ;
- ; Set the emulator exe to 'yuzu.exe'
- ; Use 'nso' extension for homebrew roms
- ;----------------------------------------------------------------------------
- StartModule()
- BezelGUI()
- FadeInStart()
- primaryExe := new Emulator(emuPath . "\" . executable) ; instantiate emulator executable object
- primaryWindowClassName := "Qt5QWindowIcon"
- emuPrimaryWindow := new Window(new WindowTitle("yuzu Nightly",primaryWindowClassName)) ; instantiate primary emulator window object
- emuConsoleWindow := new Window(new WindowTitle(,"ConsoleWindowClass"))
- Fullscreen := moduleIni.Read("Settings", "Fullscreen","true",,1)
- YuzuIni := new IniFile(A_AppData . "\yuzu\config\qt-config.ini")
- YuzuIni.CheckFile("Could not find Yuzu's ini file. Please run Yuzu manually first and make sure that you use the module recommended emulator version.")
- ; Disabling the emu exit confirmation
- confirmClose := YuzuIni.Read("UI", "confirmClose")
- If (confirmClose = "true")
- YuzuIni.Write("false", "UI", "confirmClose")
- ; Setting the game to launch on an extra window.
- singleWindowMode := YuzuIni.Read("UI", "singleWindowMode")
- If (singleWindowMode = "true")
- YuzuIni.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 yuzu 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()
- if (Fullscreen = "true"){ ; Creating fake full screen as the emu always launches in windowed mode
- WinGet emulatorID, ID, A
- emulatorWindow := new Window(new WindowTitle(,,,emulatorID))
- RLObject.hideWindowTitleBar(emulatorID)
- RLObject.hideWindowBorder(emulatorID)
- emulatorWindow.Move(0,0,A_screenWidth,A_screenHeight + 38)
- }
- 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement