Jump to content

Need help fixing my rotation script with HL3


Griffindodd

Recommended Posts

Posted

I have a script that rotates my monitor via a motor depending if a Mame game is vertical or horizontal.

My Mame module sends the name of the ROM I am launching to my 'Rotation.exe' script with the following command...

Runwait, %emupath%\Rotation.exe "%romName%"

My Rotation.exe script then checks that name against my list of vertical ROMS (Rotation.ini) and then fires the rotation of the monitor accordingly.

;[Rotation.exe]

;
;
#SingleInstance force 

romName = %1%
param := "%romName%"
;reads verticalRoms controlled roms list
IniRead, verticalRoms, %A_ScriptDir%\Rotation.ini, controls, Set2_vertical
;reads state of vertical, horizontal rotation (user added line in "controls.ini")
iniread, state, %a_scriptdir%\Rotation.ini, Controls, PrevState 
ifnotinstring, verticalRoms, %romname%, gosub, horizontalrotation


verticalrotation:
if ( State = "vertical") 
{
exitapp
} 
else if ( State = "horizontal") 
{ 
Run, %COMSPEC% /c "smccmd --resume --speed -1700", ,{enter},hide

iniwrite, vertical, C:\Hyperspin\Emulators\Mame\Rotation.ini, controls, PrevState 
exitapp
}


horizontalrotation:
if ( State = "horizontal" ) 
{
exitapp
} 
else if ( State = "vertical") 
{ 
Run, %COMSPEC% /c "smccmd --resume --speed 1700", ,{enter},hide
iniwrite, horizontal, C:\Hyperspin\Emulators\Mame\Rotation.ini, controls, PrevState 
exitapp
}


Since upgrading to RL and Mame 0.153b my rotation script fires for every ROM not just the vertical ROMs listed in my Rotation.ini

All paths are correct

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...