The NEW Build Your Own Arcade Controls

Front End Support => MaLa Frontend => Topic started by: TheElectricMonk on August 08, 2020, 01:41:53 pm

Title: [SOLVED] Display an image on second screen in sync with MaLa?
Post by: TheElectricMonk on August 08, 2020, 01:41:53 pm
Hi all,
maybe someone has managed to solve this before, but I'm stumped.

This is a bit longish, so thanks for taking the time to read it :-)

I'm building a racer arcade with a big screen, and I have created full screen images for each game detailing the controls.

MaLa is my front end, with all games (various emulators from MAME to Teknoparrot) being started via batch files, since I only want one menu on this cab.

At the moment, I have an External Application set up in the MaLa controls, so that whenever the coin button (keyboard 5) is being pushed in the main selection menu, an AutoHotKey script triggers IrfanView to find and display the image with the controls. As soon as IrfanView is closed via the cab's Exit Game button, the action returns to MaLa.
So far, so good - I can check the controls before launching the game, and hope I don't forget them while playing.

Now I've recently got my hands on a tiny LCD monitor, and I thought it would be nice to have those control instruction images on display permanently on the small screen while playing on the big screen.

And this is where I'm starting to get stuck.

I can start up IrfanView via the MaLa pre-command option and make it display my desired image. However, as soon as I do that, IrfanView steals the focus and waits for me to close it. I don't want to close it, I want to continue displaying the image, but the batch file running the emulator won't start until I close IrfanView.

Several questions arise, which I haven't been able to answer so far:

1) Is it possible to open IrfanView (or any other full-screen image display program) "without focus" or in such a way that it displays an image on the screen of my choice and stays there without waiting to be closed?
2) I've used AutoHotKey in the past to good effect, but I'm lost when it comes to its GUI commands. Can I build a script in AHK to just plop an image on the second screen and leave it there while the action continues as laid out in the batch file?
3) Are pre-commands even the right way to do this, or is there a better option? Because my ideal solution would not be to have the image displayed as the game starts, but for the image to change while I'm scrolling through the menu, just like the Snap and Marquee images change in the MaLa layout. Of course I realize that MaLa layouts don't support two screens, but is there a way via a plugin or something?

I think I remember some posts in which people have accomplished similar things with marquees on a second screen that change with their selected games while cycling through their game menus, but I can't remember whether that was done in MaLa or another frontend. Damn you, broken forums search...

As usual, any help is much appreciated.
Title: Re: Display an image on second screen in sync with MaLa?
Post by: TheElectricMonk on August 24, 2020, 07:16:37 am
OK, for those who are interested, I managed to solve it:
Let's assume the main screen is 1280 pixels wide and the secondary is 800 wide.
Just create a layout with a width of 2080 (=1280+800) pixels and add a graphics field (in my case it was a definable) where the instructions graphics should go.
Now all you need to take care of is to make sure your secondary monitor is aligned to the proper side of your main screen in the windows screen settings and voilą!

For MAME games it works beautifully, but some other emulators tend to screw up or even obscure the layout. But that's another problem to be solved another day.