Please save and restore the window position

If you play in windowed mode, you should NOT have to move the window to where you want it every single time you run the game.

Just save and restore the window position in between sessions.

Here is the code:
Upon closing the game:

// Retrieve the X,Y origin of the window
WINDOWPLACEMENT	windowPlacement;
memset( &windowPlacement, 0, sizeof(windowPlacement) );
windowPlacement.length = sizeof(WINDOWPLACEMENT);
GetWindowPlacement( hwnd, &windowPlacement );

// Store the current X,Y origin
x = windowPlacement.rcNormalPosition.left;
y =;

Then all you have to do it store that x and y, and use them when you create the game window when the game is started (aka same place where you use the stored width and height).

And I’m sure it’s even easier in unity, as saving and restoring the window position is pretty much common behaviour in all games.

1 Like

And here is actual Unity code that does this.

@Sirrian @Nimhain


Almost 2019… and the game still doesn’t remember it’s window position in between sessions.
Common guys… you are like the last game in the universe that doesn’t do this.

Just think of it this way: Try to imagine how much fun working under windows would be, if no program remembered it’s positions, and you had to move them around every single time you boot them up.

That’s what you’re doing to us…