Fixed resolution switching

This commit is contained in:
pagefault
2001-06-07 19:31:35 +00:00
parent a84b1e3890
commit 6d4eee8711

View File

@@ -1554,6 +1554,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)
{ {
CloseWindow(hMainWindow); CloseWindow(hMainWindow);
@@ -1596,6 +1597,9 @@ void initwinvideo(void)
{ {
if (newmode) clearwin(); if (newmode) clearwin();
} }
if (FullScreen == 1 && newmode == 1) { ReleaseDirectDraw(); InitDirectDraw(); }
} }
extern unsigned int vidbuffer; extern unsigned int vidbuffer;