Some video fix (pagefault)
This commit is contained in:
@@ -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 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
|
||||
SECTION .text
|
||||
|
||||
; ****************************
|
||||
|
||||
@@ -1488,7 +1488,11 @@ char WinMessage[256];
|
||||
extern unsigned char cvidmode;
|
||||
DWORD FirstVid=1;
|
||||
DWORD FirstFull=1;
|
||||
DWORD SMode=0;
|
||||
DWORD DSMode=0;
|
||||
extern BYTE GUIWFVID[];
|
||||
extern BYTE GUISMODE[];
|
||||
extern BYTE GUIDSIZE[];
|
||||
extern unsigned short resolutn;
|
||||
void clearwin();
|
||||
|
||||
@@ -1510,6 +1514,8 @@ void initwinvideo(void)
|
||||
X=0;
|
||||
Y=0;
|
||||
FullScreen=GUIWFVID[cvidmode];
|
||||
SMode=GUISMODE[cvidmode];
|
||||
DSMode=GUIDSIZE[cvidmode];
|
||||
|
||||
switch (cvidmode)
|
||||
{
|
||||
@@ -1693,7 +1699,7 @@ void initwinvideo(void)
|
||||
BlitArea.left = 0;
|
||||
BlitArea.right = SurfaceX;
|
||||
|
||||
if (FullScreen == 0)
|
||||
if (FullScreen == 0 && DSMode == 0)
|
||||
BlitArea.bottom = (SurfaceY/240)*resolutn;
|
||||
else
|
||||
BlitArea.bottom = SurfaceY;
|
||||
@@ -2086,16 +2092,18 @@ void drawscreenwin(void)
|
||||
|
||||
if (resolutn == 224 && FullScreen == 0 && PrevRes != resolutn)
|
||||
{
|
||||
BlitArea.bottom = (SurfaceY/240)*224;
|
||||
WindowHeight = (WindowHeight/239)*224;
|
||||
if (DSMode == 0) BlitArea.bottom = (SurfaceY/240)*224;
|
||||
else BlitArea.bottom = SurfaceY;
|
||||
if (SMode == 0) WindowHeight = (WindowHeight/239)*224;
|
||||
initwinvideo();
|
||||
PrevRes = resolutn;
|
||||
}
|
||||
|
||||
if (resolutn == 239 && FullScreen == 0 && PrevRes != resolutn)
|
||||
{
|
||||
BlitArea.bottom = (SurfaceY/240)*239;
|
||||
WindowHeight = (WindowHeight/224)*239;
|
||||
if (DSMode == 0) BlitArea.bottom = (SurfaceY/240)*224;
|
||||
else BlitArea.bottom = SurfaceY;
|
||||
if (SMode == 0) WindowHeight = (WindowHeight/239)*224;
|
||||
initwinvideo();
|
||||
PrevRes = resolutn;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user