The NEW Build Your Own Arcade Controls

Front End Support => MaLa Frontend => Topic started by: chucklepie on March 24, 2013, 10:16:29 pm

Title: Display not resetting after quitting Stella
Post by: chucklepie on March 24, 2013, 10:16:29 pm
Hello,
I've got Mala setup with all my emulators (about a dozen or so) and everything is working just great.

However, when using Stella (fullscreen) when I quit out of it and return to Mala the display is not reset properly and seems to shift the display about a third of the screen width  to the right and down.

The only way I've been able to get it to work is within Stella change the resolution from Auto to 1024x768 (the highest it can have) and to change my monitor display to match this.

If I change mala to go to the next emulator layout then go back to my atari 2600 layout it is ok again. I guess mala isn't picking up the display switch back event or something properly?

Is there a fix for this as I'd rather not set my resolution this low as my layouts are bigger than this and I have some applications that require more than 1024x768.

thanks.

Neil.
Title: Re: Display not resetting after quitting Stella
Post by: BadMouth on March 25, 2013, 12:00:01 pm
I have this issue with a couple emulators.
There are probably other ways, but Autohotkey fixes all.

Have Mala run this autohotkey script when it exits the game on that particular emulator.
Only change the numbers in the first section to match your regular desktop resolution. 
Do not change anything else.

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 )
}
Title: Re: Display not resetting after quitting Stella
Post by: chucklepie on March 25, 2013, 12:18:24 pm
Nifty, thanks.

I was trying to avoid using auto typers and plugin dlls (I had to resort to closemul for dreamcast, vpinball and 3do), but I'll give it a go.