win32: save the "not maximized" window size

also fix the window start up position

see http://pulkomandy.tk/projects/GrafX2/ticket/102
This commit is contained in:
Thomas Bernard
2019-05-21 20:45:21 +02:00
parent 31d3719f26
commit 2d645edbc0
8 changed files with 99 additions and 40 deletions

View File

@@ -685,6 +685,12 @@ void Main_handler(void)
// Resize requested
if (Resize_width || Resize_height)
{
if (Window_state == GFX2_WINDOW_STANDARD)
{
Default_window_width = Resize_width;
Default_window_height = Resize_height;
}
Hide_cursor();
Init_mode_video(Resize_width, Resize_height, 0, Pixel_ratio);
// Reset the variables that indicate a resize was requested.