Fix in-game rendering resolution changes on Windows. Fixes #5401