djvj

duckstation module

Mar 29th, 2022 (edited)
894
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. MEmu := "DuckStation"
  2. MEmuV := "v0.1-4790"
  3. MURL := ["https://github.com/stenzek/duckstation"]
  4. MAuthor := ["djvj"]
  5. MVersion := "1.0.0"
  6. MCRC := "D9619D1A"
  7. iCRC := "75C436E7"
  8. mId := "637841085025562464"
  9. MSystem := ["Sony PlayStation","Gun Games","Lightgun Games","Shooting Games"]
  10. ;----------------------------------------------------------------------------
  11. ; Notes:
  12. ; Supports both gui and nogui executables
  13. ;----------------------------------------------------------------------------
  14. StartModule()
  15. BezelGUI()
  16. FadeInStart()
  17.  
  18. primaryExe := new Process(emuPath . "\" . executable)   ; instantiate emulator executable object
  19.  
  20. If StringUtils.Contains(executable,"qt") {
  21.     emuWinTitle := romName
  22.     emuWinClass := "Qt610QWindowIcon"
  23. } Else {
  24.     emuWinTitle := MEmu
  25.     emuWinClass := "SDL_app"
  26. }
  27.  
  28. emuPrimaryWindow := new Window(new WindowTitle(emuWinTitle, emuWinClass))
  29.  
  30. Fullscreen := moduleIni.Read("Settings", "Fullscreen","true",,1)
  31. Fastboot := moduleIni.Read("Settings", "Fastboot","false",,1)   ; When enabled, skips the bios screen
  32.  
  33. BezelStart()
  34.  
  35. hideEmuObj := Object(emuPrimaryWindow,1)
  36. 7z(romPath, romName, romExtension, sevenZExtractPath)
  37.  
  38. fastboot := If (Fastboot = "true") ? " -fastboot" : ""
  39. fullscreen := If (Fullscreen = "true") ? " -fullscreen" : ""
  40. params := " -batch -- "
  41.  
  42. HideAppStart(hideEmuObj,hideEmu)
  43. primaryExe.Run(fullscreen . fastboot . params . """" . romPath . "\" . romName . romExtension . """")
  44. emuPrimaryWindow.Wait()
  45. emuPrimaryWindow.WaitActive()
  46. BezelDraw()
  47.  
  48. HideAppEnd(hideEmuObj,hideEmu)
  49. FadeInExit()
  50. primaryExe.Process("WaitClose")
  51. 7zCleanUp()
  52. FadeOutExit()
  53. ExitModule()
  54.  
  55.  
  56. CloseProcess:
  57.     FadeOutStart()
  58.     BezelExit()
  59.     emuPrimaryWindow.Close()
  60. Return
  61.  
Add Comment
Please, Sign In to add comment