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: Display not resetting after quitting Stella  (Read 2191 times)

0 Members and 1 Guest are viewing this topic.

chucklepie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
  • Last login:September 09, 2013, 08:56:54 am
  • I want to build my own arcade controls!
Display not resetting after quitting Stella
« 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.
« Last Edit: March 24, 2013, 10:18:07 pm by chucklepie »

BadMouth

  • Trade Count: (+6)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 9269
  • Last login:Yesterday at 10:49:58 am
  • ...
Re: Display not resetting after quitting Stella
« Reply #1 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 )
}

chucklepie

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 157
  • Last login:September 09, 2013, 08:56:54 am
  • I want to build my own arcade controls!
Re: Display not resetting after quitting Stella
« Reply #2 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.