VGA_ioport_in: Fake the occurrence of the vertical refresh when no
graphic mode has been set.
This commit is contained in:
parent
b8ae37ccda
commit
de61088197
|
@ -43,6 +43,8 @@ static int vga_height;
|
||||||
static int vga_depth;
|
static int vga_depth;
|
||||||
static BYTE vga_text_attr;
|
static BYTE vga_text_attr;
|
||||||
|
|
||||||
|
static BOOL vga_mode_initialized = FALSE;
|
||||||
|
|
||||||
static CRITICAL_SECTION vga_lock = CRITICAL_SECTION_INIT("VGA");
|
static CRITICAL_SECTION vga_lock = CRITICAL_SECTION_INIT("VGA");
|
||||||
|
|
||||||
typedef HRESULT (WINAPI *DirectDrawCreateProc)(LPGUID,LPDIRECTDRAW *,LPUNKNOWN);
|
typedef HRESULT (WINAPI *DirectDrawCreateProc)(LPGUID,LPDIRECTDRAW *,LPUNKNOWN);
|
||||||
|
@ -316,6 +318,8 @@ int VGA_SetMode(unsigned Xres,unsigned Yres,unsigned Depth)
|
||||||
|
|
||||||
par.Depth = (Depth < 8) ? 8 : Depth;
|
par.Depth = (Depth < 8) ? 8 : Depth;
|
||||||
|
|
||||||
|
vga_mode_initialized = TRUE;
|
||||||
|
|
||||||
MZ_RunInThread(VGA_DoSetMode, (ULONG_PTR)&par);
|
MZ_RunInThread(VGA_DoSetMode, (ULONG_PTR)&par);
|
||||||
return par.ret;
|
return par.ret;
|
||||||
}
|
}
|
||||||
|
@ -734,7 +738,12 @@ BYTE VGA_ioport_in( WORD port )
|
||||||
/* since we don't (yet?) serve DOS VM requests while VGA_Poll is running,
|
/* since we don't (yet?) serve DOS VM requests while VGA_Poll is running,
|
||||||
we need to fake the occurrence of the vertical refresh */
|
we need to fake the occurrence of the vertical refresh */
|
||||||
ret=vga_refresh?0x00:0x08;
|
ret=vga_refresh?0x00:0x08;
|
||||||
vga_refresh=0;
|
if (vga_mode_initialized)
|
||||||
|
vga_refresh=0;
|
||||||
|
else
|
||||||
|
/* Also fake the occurence of the vertical refresh when no graphic
|
||||||
|
mode has been set */
|
||||||
|
vga_refresh=!vga_refresh;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ret=0xff;
|
ret=0xff;
|
||||||
|
|
Loading…
Reference in New Issue