Build Your Own Arcade Controls Forum
Front End Support => MaLa Frontend => Topic started by: juggle50 on November 20, 2012, 09:18:42 am
-
Hey guys,
I'm trying to add a visual pinball table to my game list in Mala. I'm on a vertical monitor and need to rotate the screen to play it horizontally. Visual pinball doesn't have native rotation so I have to rotate my operating system 180 degrees using irotate.
The problem is MALA hates it. When I rotate the screen back to 90 degrees, the mala menu screen is pretty jacked up. It's at half the screen with white bars and all snaps and images aren't aligned.
All that to ask:
1. Is there a Mala feature that refreshes the screen? If so, do you know what the command line is so I can write it into a batch file?
2. If there isn't a screen refresh feature, what is the command to exit mala? I my have to write a batch file telling mala to close and reopen after exiting visual pinball.
Thanks guys!
-
There are checkboxes somewhere in Mala options to change the screen resolution and re-order the screen, but it never accomplished what I thought it should.
Most of my oddball scripts are for AutoHotkey.
I ended up putting this to run when the game exits and it works every time.
It just makes sure that the desktop resolution is correct.
Only change the parts that say "you can change to suit your requirements"
cD = 32 ; bits (quality) - you can change to suit your requirments
sW = 1920 ; pixels - you can change to suit your requirments
sH = 1080 ; pixels - you can change to suit your requirments
rR = 60 ; Hz (frequency) - you can change to suit your requirments
ChangeDisplaySettings( cD, sW, sH, rR )
ExitAPP
Return
ChangeDisplaySettings( cD, sW, sH, rR ) {
VarSetCapacity(dM,156,0), NumPut(156,dM,36)
DllCall( "EnumDisplaySettingsA", UInt,0, UInt,-1, UInt,&dM ), NumPut(0x5c0000,dM,40)
NumPut(cD,dM,104), NumPut(sW,dM,108), NumPut(sH,dM,112), NumPut(rR,dM,120)
Return DllCall( "ChangeDisplaySettingsA", UInt,&dM, UInt,0 )
}
You might also try setting Mala and Visual Pinball to the same resolution.
-
Cool. Thanks Man. Could I make this part of a bat file that launches when Closemul exits? (I'm using Closemul to close VPinball) I'm kind of a newbie at writing scripts and bat files. I've only created very simple bat files.
Any help knowing exactly where to put the script and how to launch it would be helpful!
Also, do you need any of the text after "exit ap"?
I've got my native resolution at 90 degrees set to 600 x 800 and Visual Pinball at horizontal orientation is set to 800 x 600 so I'm not sure why mala has trouble going back to 600 x 800 when I rotate my operating system back to 90 degrees.
Thanks again for the help!
-
Cool. Thanks Man. Could I make this part of a bat file that launches when Closemul exits? (I'm using Closemul to close VPinball) I'm kind of a newbie at writing scripts and bat files. I've only created very simple bat files.
Any help knowing exactly where to put the script and how to launch it would be helpful!
Also, do you need any of the text after "exit ap"?
I've got my native resolution at 90 degrees set to 600 x 800 and Visual Pinball at horizontal orientation is set to 800 x 600 so I'm not sure why mala has trouble going back to 600 x 800 when I rotate my operating system back to 90 degrees.
Thanks again for the help!
It only works in Autohotkey.
When you download Autohotkey, there is an application included that converts a .ahk script to a .exe
You could call the .ahk or .exe from a bat
Put the autohotkey script in the same folder as your batch file and you won't have to specify a path to it.
Yes, you need everything after exit app.
I'm only using it for oddball things where I have a script for each individual game.
It exits the game and resets the screen resolution when ESC (my exit key) is pressed.
I don't use visual pinball, so I can't give specific help there.
You should be able to install autohotkey, copy and paste the first script I posted into a text file and save it as a .ahk file.
Then just have closemul run that on exit.
If it's going onto a different computer that you don't to install autohotkey on, you can compile it to a .exe using the program that came with autohotkey.
I can't imagine not having autohotkey on my cab though. It solves so many problems.
-
Hey badmouth,
Getting home from Thanksgiving tonight and am going to try this suggested method. Do you know the command line to exit mala just in case I need to have mala close and reopen?
-
In autohotkey, it is
Process, Close, mala.exe
I wouldn't think you'd have to take it that far though.