fix setting resolution on startup

see title, fixes toggle fullscreen when startFullScreen was set in advanced settings.

@Montellese could you have a look please. forcing save of resolution before window was created did not work, even crashed on Windows.