Some video fix (pagefault)

This commit is contained in:
z_demo_z
2002-07-15 00:12:36 +00:00
parent f932ee46f8
commit ecd555183d
2 changed files with 15 additions and 6 deletions

View File

@@ -1255,6 +1255,7 @@ 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 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 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 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
SECTION .text SECTION .text
; **************************** ; ****************************

View File

@@ -1488,7 +1488,11 @@ char WinMessage[256];
extern unsigned char cvidmode; extern unsigned char cvidmode;
DWORD FirstVid=1; DWORD FirstVid=1;
DWORD FirstFull=1; DWORD FirstFull=1;
DWORD SMode=0;
DWORD DSMode=0;
extern BYTE GUIWFVID[]; extern BYTE GUIWFVID[];
extern BYTE GUISMODE[];
extern BYTE GUIDSIZE[];
extern unsigned short resolutn; extern unsigned short resolutn;
void clearwin(); void clearwin();
@@ -1510,6 +1514,8 @@ void initwinvideo(void)
X=0; X=0;
Y=0; Y=0;
FullScreen=GUIWFVID[cvidmode]; FullScreen=GUIWFVID[cvidmode];
SMode=GUISMODE[cvidmode];
DSMode=GUIDSIZE[cvidmode];
switch (cvidmode) switch (cvidmode)
{ {
@@ -1693,7 +1699,7 @@ void initwinvideo(void)
BlitArea.left = 0; BlitArea.left = 0;
BlitArea.right = SurfaceX; BlitArea.right = SurfaceX;
if (FullScreen == 0) if (FullScreen == 0 && DSMode == 0)
BlitArea.bottom = (SurfaceY/240)*resolutn; BlitArea.bottom = (SurfaceY/240)*resolutn;
else else
BlitArea.bottom = SurfaceY; BlitArea.bottom = SurfaceY;
@@ -2086,16 +2092,18 @@ void drawscreenwin(void)
if (resolutn == 224 && FullScreen == 0 && PrevRes != resolutn) if (resolutn == 224 && FullScreen == 0 && PrevRes != resolutn)
{ {
BlitArea.bottom = (SurfaceY/240)*224; if (DSMode == 0) BlitArea.bottom = (SurfaceY/240)*224;
WindowHeight = (WindowHeight/239)*224; else BlitArea.bottom = SurfaceY;
if (SMode == 0) WindowHeight = (WindowHeight/239)*224;
initwinvideo(); initwinvideo();
PrevRes = resolutn; PrevRes = resolutn;
} }
if (resolutn == 239 && FullScreen == 0 && PrevRes != resolutn) if (resolutn == 239 && FullScreen == 0 && PrevRes != resolutn)
{ {
BlitArea.bottom = (SurfaceY/240)*239; if (DSMode == 0) BlitArea.bottom = (SurfaceY/240)*224;
WindowHeight = (WindowHeight/224)*239; else BlitArea.bottom = SurfaceY;
if (SMode == 0) WindowHeight = (WindowHeight/239)*224;
initwinvideo(); initwinvideo();
PrevRes = resolutn; PrevRes = resolutn;
} }