Permalink
Browse files

VGA: On any mode change, refresh the VGA color palette. For some reas…

…on, the mode change code corrupts the color palette as rendered to screen. This fixes Crystal Dream II palette errors.
  • Loading branch information...
joncampbell123 committed Feb 16, 2018
1 parent 061d6e2 commit 7d60fb261d9a2b30e62488e37ad5f2334981d819
Showing with 5 additions and 2 deletions.
  1. +1 −0 CHANGELOG
  2. +4 −2 src/hardware/vga_draw.cpp
@@ -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.
@@ -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) {

0 comments on commit 7d60fb2

Please sign in to comment.