Fixed another resolution switching bug

This commit is contained in:
pagefault
2001-06-07 20:36:36 +00:00
parent 4cf518995f
commit 16045726f2

View File

@@ -1530,7 +1530,6 @@ void initwinvideo(void)
} }
else else
{ {
FirstVid=0;
atexit(ExitFunction); atexit(ExitFunction);
AltTimer = AlternateTimer; AltTimer = AlternateTimer;
@@ -1561,8 +1560,6 @@ void initwinvideo(void)
hMainWindow = CreateWindow( "ZSNESWIN", WinName, WS_VISIBLE|WS_POPUP,X,Y, //WS_OVERLAPPED "ZSNESWIN" hMainWindow = CreateWindow( "ZSNESWIN", WinName, WS_VISIBLE|WS_POPUP,X,Y, //WS_OVERLAPPED "ZSNESWIN"
WindowWidth,WindowHeight,NULL,NULL,hInst,NULL); WindowWidth,WindowHeight,NULL,NULL,hInst,NULL);
if (FullScreen == 0) InitDirectDraw();
CheckPriority(); CheckPriority();
CheckAlwaysOnTop(); CheckAlwaysOnTop();
@@ -1579,23 +1576,38 @@ void initwinvideo(void)
TestJoy(); TestJoy();
} }
if (FirstVid == 1)
{
FirstVid = 0;
InitDirectDraw();
return;
}
if (Moving == 1) return;
if (FullScreen == 0 && PrevFull == 1) if (FullScreen == 0 && PrevFull == 1)
{ {
PrevFull = 0; PrevFull = 0;
ReleaseDirectDraw(); ReleaseDirectDraw();
InitDirectDraw(); InitDirectDraw();
} }
if (FullScreen == 1 && PrevFull != 1) { PrevFull = 1; InitDirectDraw(); }
if (Moving == 1) return; if (FullScreen == 1 && PrevFull != 1)
{
PrevFull = 1;
InitDirectDraw();
}
if (FullScreen == 0 || newmode == 1) if (FullScreen == 0 || newmode == 1)
{ {
if (newmode) clearwin(); if (newmode) clearwin();
} }
if (FullScreen == 1 && newmode == 1) { ReleaseDirectDraw(); InitDirectDraw(); } if (FullScreen == 1 && newmode == 1)
{
ReleaseDirectDraw();
InitDirectDraw();
}
} }