Now restores window position when returning from fullscreen
This commit is contained in:
@@ -1700,12 +1700,13 @@ void initwinvideo(void)
|
|||||||
if (X>(GetSystemMetrics(SM_CXSCREEN) - WindowWidth)) X=(GetSystemMetrics(SM_CXSCREEN) - WindowWidth);
|
if (X>(GetSystemMetrics(SM_CXSCREEN) - WindowWidth)) X=(GetSystemMetrics(SM_CXSCREEN) - WindowWidth);
|
||||||
if (Y<0)Y=0;
|
if (Y<0)Y=0;
|
||||||
if (Y>(GetSystemMetrics(SM_CYSCREEN) - WindowHeight)) Y=(GetSystemMetrics(SM_CYSCREEN) - WindowHeight);
|
if (Y>(GetSystemMetrics(SM_CYSCREEN) - WindowHeight)) Y=(GetSystemMetrics(SM_CYSCREEN) - WindowHeight);
|
||||||
|
|
||||||
if (FullScreen==1) {X=0; Y=0;}
|
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,
|
MoveWindow(hMainWindow, X, Y, WindowWidth, WindowHeight, TRUE);
|
||||||
WindowWidth, WindowHeight, TRUE );
|
|
||||||
|
|
||||||
wndpl.length = sizeof(wndpl);
|
wndpl.length = sizeof(wndpl);
|
||||||
GetWindowPlacement(hMainWindow, &wndpl);
|
GetWindowPlacement(hMainWindow, &wndpl);
|
||||||
@@ -1739,6 +1740,7 @@ void initwinvideo(void)
|
|||||||
}
|
}
|
||||||
X=(GetSystemMetrics(SM_CXSCREEN) - WindowWidth) / 2;
|
X=(GetSystemMetrics(SM_CXSCREEN) - WindowWidth) / 2;
|
||||||
Y=(GetSystemMetrics(SM_CYSCREEN) - WindowHeight) / 2;
|
Y=(GetSystemMetrics(SM_CYSCREEN) - WindowHeight) / 2;
|
||||||
|
|
||||||
if (FullScreen==1) {X=0; Y=0;}
|
if (FullScreen==1) {X=0; Y=0;}
|
||||||
|
|
||||||
if (hMainWindow)
|
if (hMainWindow)
|
||||||
|
|||||||
Reference in New Issue
Block a user