Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;----------------------------------------------------------------------------
- ; MAME
- ; MAME .147
- ; by BBB & djvj & brolly
- ; 1.1
- ;
- ; Notes:
- ;----------------------------------------------------------------------------
- ;#WinActivateForce
- ;----------------------------------------------------------------------------
- fullscreen=true ;Set fullscreen mode
- videomode = d3d ; choices are gdi,ddraw,d3d. If left blank, mame uses d3d by default
- use_bezels=true ;Enables/disables the display of bezels
- use_overlays=true ;Enables/disables the display of overlays
- use_backdrops=true ;Enables/disables the display of backdrops
- ;----------------------------------------------------------------------------
- GUI_ID := FadeInStart()
- ParmFullscreen := (If fullscreen = "true" ? ("-nowindow") : ("-window"))
- ParmVideoMode := (If videomode != "" ? ("-video " . videomode) : (""))
- ParmBezels := (If use_bezels = "true" ? ("-use_bezels") : ("-nouse_bezels"))
- ParmOverlays := (If use_overlays = "true" ? ("-use_overlays") : ("-nouse_overlays"))
- ParmBackdrops := (If use_backdrops = "true" ? ("-use_backdrops") : ("-nouse_backdrops"))
- params=%ParmFullscreen% %ParmVideoMode% %ParmBezels% %ParmOverlays% %ParmBackdrops%
- winstate := (If fullscreen = "true" ? ("Hide UseErrorLevel") : ("UseErrorLevel"))
- Run, %executable% %romName% %params%, %emuPath%, %winstate%
- If(ErrorLevel != 0){
- If (ErrorLevel = 1){
- Error = Failed Validity
- }Else If(ErrorLevel = 2){
- Error = Missing Files
- }Else If(ErrorLevel = 3){
- Error = Fatal Error
- }Else If(ErrorLevel = 4){
- Error = Device Error
- }Else If(ErrorLevel = 5){
- Error = Game Does Not Exist
- }Else If(ErrorLevel = 6){
- Error = Invalid Config
- }Else If(ErrorLevel = 7 || ErrorLevel = 8 || ErrorLevel = 9){
- Error = Identification Error
- }Else{
- Error = Mame Error
- }
- MsgBox Mame Error - %Error%
- }
- WinWait, MAME ahk_class MAME
- WinWaitActive, MAME ahk_class MAME
- GUI_ID2 := FadeInExit()
- Process, WaitClose, %executable%
- GUI_ID4 := FadeOutExit()
- WinActivate, Hyperspin
- ExitModule()
- HaltEmu:
- ;WinMinimize, ahk_class %EmulatorClass%,,Hyperspin
- return
- RestoreEmu:
- ;loop{
- ; WinActivate, ahk_class %EmulatorClass%,,Hyperspin
- ; IfWinActive, ahk_class %EmulatorClass%,,Hyperspin
- ; {
- ; Break
- ; }
- ; sleep, 100
- ;}
- return
- CloseProcess:
- GUI_ID3 := FadeOutStart()
- WinClose, MAME ahk_class MAME
- Return
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement