Now restores window position when returning from fullscreen

This commit is contained in:
pagefault
2001-08-26 02:24:16 +00:00
parent 3c84c0e563
commit 6d03d8c15d

View File

@@ -1700,12 +1700,13 @@ void initwinvideo(void)
if (X>(GetSystemMetrics(SM_CXSCREEN) - WindowWidth)) X=(GetSystemMetrics(SM_CXSCREEN) - WindowWidth);
if (Y<0)Y=0;
if (Y>(GetSystemMetrics(SM_CYSCREEN) - WindowHeight)) Y=(GetSystemMetrics(SM_CYSCREEN) - WindowHeight);
if (FullScreen==1) {X=0; Y=0;}
MainWindowX = X; MainWindowY = Y;
if (FullScreen==0 && newmode == 1) { X = MainWindowX; Y = MainWindowY; }
else if (FullScreen==0) { MainWindowX = X; MainWindowY = Y; }
MoveWindow( hMainWindow, X, Y,
WindowWidth, WindowHeight, TRUE );
MoveWindow(hMainWindow, X, Y, WindowWidth, WindowHeight, TRUE);
wndpl.length = sizeof(wndpl);
GetWindowPlacement(hMainWindow, &wndpl);
@@ -1739,6 +1740,7 @@ void initwinvideo(void)
}
X=(GetSystemMetrics(SM_CXSCREEN) - WindowWidth) / 2;
Y=(GetSystemMetrics(SM_CYSCREEN) - WindowHeight) / 2;
if (FullScreen==1) {X=0; Y=0;}
if (hMainWindow)