Incorrect default resolution when starting game despite .ini

I can set these settings in DefaultGameUserSettings.ini within Visual studio or notepad before running the project:

Code:
[/Script/Engine.GameUserSettings]
bUseVSync=False
ResolutionSizeX=1920
ResolutionSizeY=1080
LastUserConfirmedResolutionSizeX=1920
LastUserConfirmedResolutionSizeY=1080
WindowPosX=5
WindowPosY=500
bUseDesktopResolutionForFullscreen=False
FullscreenMode=2
LastConfirmedFullscreenMode=2
Version=5
AudioQualityLevel=0

When the project is open and I run the game, it seems to use the window position and fullscreen mode (setting it to windowed or fullscreen on start) BUT it completely ignores any resolution that I set here, and instead it gets the resolution from these lines in DefaultEditorPerProjectUserSettings.ini:

ClientWindowWidth=1280

ClientWindowHeight=720

Now every tutorial I’ve come across mentions nothing of this ini file. And me changing the resolution settings from the settings menu in-editor does not change these values and thus does nothing. I can’t seem to find out what the issue is, why its being driven by these numbers instead of the resolution size from DefaultGameUserSettings.ini

I cleared the saved/config folder and the problem still occurs. Any insight into this would be a great help, as I can’t seem to control my game’s resolution other than with console commands or directly setting that clientWindow size inside of the other ini file.

Edit: I should specify that this issue is occuring for running as Standalone Game. When running PIE New Editor Window, the resolution does obey the size set through the in-editor settings, but the standalone game does not.

I have been banging my head into the same bug on 4.12. I finally managed to work around it with.

    auto settings = GEngine->GetGameUserSettings();
    if (settings->IsDirty()) {
        // WTF why is this a thing?
        settings->ApplySettings(false);
    }

It seems that the engine knows it’s in the wrong resolution as the user settings are dirty on load. Just telling it to apply what it loaded seems to fix it.

Note: I have not changed any settings to make them dirty. It just starts that way.

Additionally You can control game resolution with console commands. For example “r.setRes 1920x1980f” causes game to change resolution to 1920x1080 in fullscreen mode. You also execute console commands from within blueprints by calling “Execute Console Command” from level blueprint. This is how i set resolution in my game and it works always.

Console commands do not work in a packaged game, as far as I know. Both of your responses require letting the game open in an improper resolution then adjusting to the correct one from there.

I ended up deleting the file DefaultEditorPerProjectUserSettings.ini

More specifically, I left the file intact but deleted the entire [/Script/UnrealEd.LevelEditorPlaySettings] section, the other section remaining being [/Script/UnrealEd.EditorExperimentalSettings])

Without that file there overriding the DefaultGameUserSettings, the resolution and settings you set will be the default

I realize that the game opens at the wrong resolution. But until Epic fixes the issue or lets us know a better work around, this is the best I’ve found.

It’s better that people can keep playing your game, even if it flickers a bit on launch vs the alternative.