I’m trying to display the games current resolution in one of my menus.
To set the default game resolution on first launch I created DefaultGameUserSettings.ini in MyProject/Config and made sure the resolution values were set in the file:
[/Script/Engine.GameUserSettings] bUseVSync=False ResolutionSizeX=800 ResolutionSizeY=600 LastUserConfirmedResolutionSizeX=800 LastUserConfirmedResolutionSizeY=600 WindowPosX=-1 WindowPosY=-1 bUseDesktopResolutionForFullscreen=True FullscreenMode=2 LastConfirmedFullscreenMode=2 Version=5
In my code I am checking the values of:
When I launch as standalone game, GSystemResolution and GetScreenResolution() return different values, and neither value matches what I have set in DefaultGameUserSettings.ini!
Which value should be trusted for getting the current resolution and how come it’s not working for me? Also, which INI file should I save the new resolution to once the user changes it?