Video fix 2 (pagefault)

This commit is contained in:
z_demo_z
2002-07-15 23:18:37 +00:00
parent 901401ff74
commit 06685d53d0
2 changed files with 30 additions and 14 deletions

View File

@@ -1255,7 +1255,10 @@ NEWSYM GUIDSIZE, db 0,0,0,1,0,1,1,1,1,0,1,0,1,0,1,1,0,1,0,1,1,0,1,0,1,0,1,1,0,1,
NEWSYM GUIRATIO, db 0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
NEWSYM GUIBIFIL, db 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0
NEWSYM GUITBWVID, db 0,1,0,0,0,0,1,1,1,0,0,0,0,1,1,1,0,0,1,1,1,0,0,0,0,1,1,1,0,0,1,1,1 ; Triple Buffering (Win)
NEWSYM GUISMODE, db 0,0,0,0,1,1,0,1,1,0,0,1,0,1,0,1,1,1,1,0,1,0,0,1,1,1,0,1,1,1,1,0,1
NEWSYM GUISMODE, db 0,0,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1,0,1,0,0,0,0,1,0,1,0,0,1,0,1,0,0
NEWSYM GUIDSMODE, db 0,0,0,0,0,1,0,1,0,0,0,0,1,0,0,1,0,1,0,0,1,0,0,0,1,0,0,1,0,1,0,0,1
SECTION .text
; ****************************

View File

@@ -1492,7 +1492,7 @@ DWORD SMode=0;
DWORD DSMode=0;
extern BYTE GUIWFVID[];
extern BYTE GUISMODE[];
extern BYTE GUIDSIZE[];
extern BYTE GUIDSMODE[];
extern unsigned short resolutn;
void clearwin();
@@ -1515,7 +1515,7 @@ void initwinvideo(void)
Y=0;
FullScreen=GUIWFVID[cvidmode];
SMode=GUISMODE[cvidmode];
DSMode=GUIDSIZE[cvidmode];
DSMode=GUIDSMODE[cvidmode];
switch (cvidmode)
{
@@ -1699,10 +1699,23 @@ void initwinvideo(void)
BlitArea.left = 0;
BlitArea.right = SurfaceX;
if (FullScreen == 0 && DSMode == 0)
if (FullScreen == 0)
{
if (SurfaceX == 256) BlitArea.bottom = (SurfaceY/240)*resolutn;
if (SurfaceX == 512)
{
BlitArea.bottom = (SurfaceY/240)*resolutn;
if (DSMode == 1) BlitArea.bottom = SurfaceY;
}
}
else
{
if (SMode == 1)
BlitArea.bottom = (SurfaceY/240)*resolutn;
else
BlitArea.bottom = SurfaceY;
}
if (PrevRes == 0) PrevRes = resolutn;
@@ -2092,18 +2105,18 @@ void drawscreenwin(void)
if (resolutn == 224 && FullScreen == 0 && PrevRes != resolutn)
{
if (DSMode == 0) BlitArea.bottom = (SurfaceY/240)*224;
else BlitArea.bottom = SurfaceY;
if (SMode == 0) WindowHeight = (WindowHeight/239)*224;
BlitArea.bottom = (SurfaceY/240)*224;
if (SurfaceX == 512 && DSMode == 1) BlitArea.bottom = SurfaceY;
if ((SurfaceX == 256 || SurfaceX == 512) && (SMode == 0 && DSMode == 0)) WindowHeight = (WindowHeight/239)*224;
initwinvideo();
PrevRes = resolutn;
}
if (resolutn == 239 && FullScreen == 0 && PrevRes != resolutn)
{
if (DSMode == 0) BlitArea.bottom = (SurfaceY/240)*224;
else BlitArea.bottom = SurfaceY;
if (SMode == 0) WindowHeight = (WindowHeight/239)*224;
BlitArea.bottom = (SurfaceY/240)*239;
if (SurfaceX == 512 && DSMode == 1) BlitArea.bottom = SurfaceY;
if ((SurfaceX == 256 || SurfaceX == 512) && (SMode == 0 && DSMode == 0)) WindowHeight = (WindowHeight/224)*239;
initwinvideo();
PrevRes = resolutn;
}