Advertisement
Guest User

Untitled

a guest
Feb 20th, 2019
86
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.38 KB | None | 0 0
  1. ;----------------------------------------------------------------------------
  2. ; MAME
  3. ; MAME .147
  4. ; by BBB & djvj & brolly
  5. ; 1.1
  6. ;
  7. ; Notes:
  8. ;----------------------------------------------------------------------------
  9. ;#WinActivateForce
  10. ;----------------------------------------------------------------------------
  11. fullscreen=true ;Set fullscreen mode
  12. videomode = d3d ; choices are gdi,ddraw,d3d. If left blank, mame uses d3d by default
  13. use_bezels=true ;Enables/disables the display of bezels
  14. use_overlays=true ;Enables/disables the display of overlays
  15. use_backdrops=true ;Enables/disables the display of backdrops
  16. ;----------------------------------------------------------------------------
  17.  
  18. GUI_ID := FadeInStart()
  19.  
  20. ParmFullscreen := (If fullscreen = "true" ? ("-nowindow") : ("-window"))
  21. ParmVideoMode := (If videomode != "" ? ("-video " . videomode) : (""))
  22. ParmBezels := (If use_bezels = "true" ? ("-use_bezels") : ("-nouse_bezels"))
  23. ParmOverlays := (If use_overlays = "true" ? ("-use_overlays") : ("-nouse_overlays"))
  24. ParmBackdrops := (If use_backdrops = "true" ? ("-use_backdrops") : ("-nouse_backdrops"))
  25.  
  26. params=%ParmFullscreen% %ParmVideoMode% %ParmBezels% %ParmOverlays% %ParmBackdrops%
  27. winstate := (If fullscreen = "true" ? ("Hide UseErrorLevel") : ("UseErrorLevel"))
  28.  
  29. Run, %executable% %romName% %params%, %emuPath%, %winstate%
  30.  
  31. If(ErrorLevel != 0){
  32. If (ErrorLevel = 1){
  33. Error = Failed Validity
  34. }Else If(ErrorLevel = 2){
  35. Error = Missing Files
  36. }Else If(ErrorLevel = 3){
  37. Error = Fatal Error
  38. }Else If(ErrorLevel = 4){
  39. Error = Device Error
  40. }Else If(ErrorLevel = 5){
  41. Error = Game Does Not Exist
  42. }Else If(ErrorLevel = 6){
  43. Error = Invalid Config
  44. }Else If(ErrorLevel = 7 || ErrorLevel = 8 || ErrorLevel = 9){
  45. Error = Identification Error
  46. }Else{
  47. Error = Mame Error
  48. }
  49. MsgBox Mame Error - %Error%
  50. }
  51.  
  52. WinWait, MAME ahk_class MAME
  53. WinWaitActive, MAME ahk_class MAME
  54.  
  55. GUI_ID2 := FadeInExit()
  56.  
  57. Process, WaitClose, %executable%
  58.  
  59. GUI_ID4 := FadeOutExit()
  60.  
  61. WinActivate, Hyperspin
  62.  
  63. ExitModule()
  64.  
  65. HaltEmu:
  66. ;WinMinimize, ahk_class %EmulatorClass%,,Hyperspin
  67. return
  68.  
  69. RestoreEmu:
  70. ;loop{
  71. ; WinActivate, ahk_class %EmulatorClass%,,Hyperspin
  72. ; IfWinActive, ahk_class %EmulatorClass%,,Hyperspin
  73. ; {
  74. ; Break
  75. ; }
  76. ; sleep, 100
  77. ;}
  78. return
  79.  
  80. CloseProcess:
  81. GUI_ID3 := FadeOutStart()
  82. WinClose, MAME ahk_class MAME
  83. Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement