VGA: On any mode change, refresh the VGA color palette. For some reason, the mode change code corrupts the color palette as rendered to screen. This fixes Crystal Dream II palette errors.

This commit is contained in:
Jonathan Campbell 2018-02-15 23:32:28 -08:00
parent 061d6e2835
commit 7d60fb261d
2 changed files with 5 additions and 2 deletions

View File

@ -1,4 +1,5 @@
(next)
- VGA palette errors with Crystal Dream II fixed.
- PC-98 FM synthesis fixed not to initialize itself
again when rebooting, which fixes a problem with
garbled FM synthesis after rebooting.

View File

@ -2702,10 +2702,12 @@ void VGA_SetupDrawing(Bitu /*val*/) {
vga_fps = fps;
VGA_VerticalTimer(0);
}
VGA_DAC_UpdateColorPalette();
}
vga.draw.delay.singleline_delay = (float)vga.draw.delay.htotal;
/* FIXME: Why is this required to prevent VGA palette errors with Crystal Dream II?
* What is this code doing to change the palette prior to this point? */
VGA_DAC_UpdateColorPalette();
}
void VGA_KillDrawing(void) {