Jump to content
LaunchBox Community Forums

Help with Desktop Resolution when exiting emulator


dsnyd22

Recommended Posts

Sorry if this has been answerd. I found a couple threads about ahks etc but couldn't successfully fix my issue.  All my systems are working well right now except for one issue i have with Atari 5200 system, which i run thru Retroarch.  It loads and plays games fine but when i exit out of emulator my Desktop has switched from 4K to 1440 and also has switched from 60Hz to 30HZ.  I have to mnanually change back every time after launching that system. Im hoping to find the easiest solution so this doesnt happen every time i exit atari 5200 game. 

Link to comment
Share on other sites

4 hours ago, dsnyd22 said:

Sorry if this has been answerd. I found a couple threads about ahks etc but couldn't successfully fix my issue.  All my systems are working well right now except for one issue i have with Atari 5200 system, which i run thru Retroarch.  It loads and plays games fine but when i exit out of emulator my Desktop has switched from 4K to 1440 and also has switched from 60Hz to 30HZ.  I have to mnanually change back every time after launching that system. Im hoping to find the easiest solution so this doesnt happen every time i exit atari 5200 game. 

I would  bet your resolution and refresh rate is instead being changed when you boot into the game, rather than on exit. Open Retroarch Quick Menu when in game and navigate to Settings > Video > Output > Screen Resolution to see what it is and change accordingly. You can take a look before booting and after exiting game too for having a direct comparison of what changed and when.

It's possible the game or core has those settings defined and is doing what is expected. If this is the case you just need to change the setting and then make sure it is saved if you don't have the automatic save on exit function enabled

So basically first asking you to confirm your res/refresh rate are being changed to something else for one reason or another that is unexplained. If everything is in order settings wise but you still have problems, then it makes sense to resort to using a script. Which I've included here should you need it. You may need to alter it accordingly for it to function as needed. This is an example that will change into 4K 60Hz when the game/emulator exits.

 

WinWait, ahk_exe retroarch.exe			;wait for Retroarch to exist
WinWaitClose, ahk_exe retroarch.exe		;wait for Retroarch to exit
ChangeDisplaySettings(32, 3840, 2160, 60)	;color bitrate, horizontal resolution, vertical resolution, refresh rate - adjust resolution and refresh rate as needed

;Don't change anything below here
ChangeDisplaySettings(cD, sW, sH, rR) 
{
	VarSetCapacity(dM,156,0), NumPut(156,2,&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)
}

 

Link to comment
Share on other sites

3 hours ago, skizzosjt said:

I would  bet your resolution and refresh rate is instead being changed when you boot into the game, rather than on exit. Open Retroarch Quick Menu when in game and navigate to Settings > Video > Output > Screen Resolution to see what it is and change accordingly. You can take a look before booting and after exiting game too for having a direct comparison of what changed and when.

It's possible the game or core has those settings defined and is doing what is expected. If this is the case you just need to change the setting and then make sure it is saved if you don't have the automatic save on exit function enabled

So basically first asking you to confirm your res/refresh rate are being changed to something else for one reason or another that is unexplained. If everything is in order settings wise but you still have problems, then it makes sense to resort to using a script. Which I've included here should you need it. You may need to alter it accordingly for it to function as needed. This is an example that will change into 4K 60Hz when the game/emulator exits.

 

WinWait, ahk_exe retroarch.exe			;wait for Retroarch to exist
WinWaitClose, ahk_exe retroarch.exe		;wait for Retroarch to exit
ChangeDisplaySettings(32, 3840, 2160, 60)	;color bitrate, horizontal resolution, vertical resolution, refresh rate - adjust resolution and refresh rate as needed

;Don't change anything below here
ChangeDisplaySettings(cD, sW, sH, rR) 
{
	VarSetCapacity(dM,156,0), NumPut(156,2,&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)
}

 

I didnt even have to tweak it. worked perfectly since that was my default settings you had in script. Thanks!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...