Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Mala command line questions  (Read 4074 times)

0 Members and 1 Guest are viewing this topic.

juggle50

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:July 18, 2024, 07:25:48 am
  • Your either on the bus or off the bus
Mala command line questions
« 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!

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Re: Mala command line questions
« Reply #1 on: November 20, 2012, 09:32:33 am »
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"

Code: [Select]
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.

juggle50

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:July 18, 2024, 07:25:48 am
  • Your either on the bus or off the bus
Mala command line questions
« Reply #2 on: November 20, 2012, 10:47:26 am »
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!

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Re: Mala command line questions
« Reply #3 on: November 20, 2012, 11:03:39 am »
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.
« Last Edit: November 20, 2012, 11:16:07 am by BadMouth »

juggle50

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 323
  • Last login:July 18, 2024, 07:25:48 am
  • Your either on the bus or off the bus
Mala command line questions
« Reply #4 on: November 25, 2012, 11:49:27 am »
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?

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9270
  • Last login:July 14, 2025, 01:30:54 pm
  • ...
Re: Mala command line questions
« Reply #5 on: November 25, 2012, 05:54:44 pm »
In autohotkey, it is

Process, Close, mala.exe

I wouldn't think you'd have to take it that far though.