1
0
Fork 0

small additions: vga override, lazy fullscreen switching, pci read override

Imported-from: https://svn.code.sf.net/p/dosbox/code-0/dosbox/trunk@3768
This commit is contained in:
Sebastian Strohhäcker 2011-12-11 17:30:50 +00:00
parent 41d307292b
commit 77970d28cd
5 changed files with 100 additions and 9 deletions

View file

@ -131,6 +131,12 @@ static Bit8u read_pci_register(PCI_Device* dev,Bit8u regnum) {
if ((parsed_regnum>=0) && (parsed_regnum<256))
return pci_cfg_data[dev->PCIId()][dev->PCISubfunction()][parsed_regnum];
Bit8u newval, mask;
if (dev->OverrideReadRegister(regnum, &newval, &mask)) {
Bit8u oldval=pci_cfg_data[dev->PCIId()][dev->PCISubfunction()][regnum] & (~mask);
return oldval | (newval & mask);
}
return 0xff;
}

View file

@ -825,7 +825,7 @@ static void VGA_VerticalTimer(Bitu /*val*/) {
break;
}
//Check if we can actually render, else skip the rest (frameskip)
if (!RENDER_StartUpdate())
if (vga.draw.vga_override || !RENDER_StartUpdate())
return;
vga.draw.address_line = vga.config.hlines_skip;
@ -1557,7 +1557,9 @@ void VGA_SetupDrawing(Bitu /*val*/) {
LOG(LOG_VGA,LOG_NORMAL)("%s width, %s height aspect %f",
doublewidth ? "double":"normal",doubleheight ? "double":"normal",aspect_ratio);
#endif
RENDER_SetSize(width,height,bpp,(float)fps,aspect_ratio,doublewidth,doubleheight);
if (!vga.draw.vga_override)
RENDER_SetSize(width, height, bpp, (float)fps, aspect_ratio,
doublewidth, doubleheight);
}
}
@ -1567,5 +1569,19 @@ void VGA_KillDrawing(void) {
PIC_RemoveEvents(VGA_DrawEGASingleLine);
vga.draw.parts_left = 0;
vga.draw.lines_done = ~0;
RENDER_EndUpdate(true);
if (!vga.draw.vga_override) RENDER_EndUpdate(true);
}
void VGA_SetOverride(bool vga_override) {
if (vga.draw.vga_override!=vga_override) {
if (vga_override) {
VGA_KillDrawing();
vga.draw.vga_override=true;
} else {
vga.draw.vga_override=false;
vga.draw.width=0; // change it so the output window gets updated
VGA_SetupDrawing(0);
}
}
}