Some interesting behaviour with GameUserSettings
. When launching as a standalone game from the Editor, the game starts in windowed mode. Pressing on a button on screen which executes the following code, the game switches to fullscreen mode
UGameUserSettings::GetGameUserSettings()->ApplySettings(false);
UGameUserSettings::GetGameUserSettings()->SaveSettings();
No other call to any resolution or window settings are made.
Previously unedited (probably) GameUserSettings.ini
has this content:
[/Script/Engine.GameUserSettings]
bUseVSync=False
bUseDynamicResolution=False
ResolutionSizeX=2304
ResolutionSizeY=1440
LastUserConfirmedResolutionSizeX=2560
LastUserConfirmedResolutionSizeY=1440
WindowPosX=-1
WindowPosY=-1
FullscreenMode=0
LastConfirmedFullscreenMode=1
PreferredFullscreenMode=0
...
- Why did the game start in windowed mode?
- Why did just applying settings trigger fullscreen mode?
- Is this
.ini
file meant to be edited by hand? - What is the correct way to ensure the game starts in the correct fullscreen/windowed mode and does not apply some invisible settings when they have not been explicitly set by the developer in code?