Voodoo: fixed randomly missing color palette updates.

This commit is contained in:
Volker Ruppert 2023-12-29 15:18:06 +01:00
parent e3612c30f8
commit a1872535ca
2 changed files with 4 additions and 0 deletions

View File

@ -856,9 +856,11 @@ void bx_voodoo_base_c::vertical_timer(void)
if (v->fbi.video_changed || v->fbi.clut_dirty) {
// TODO: use tile-based update mechanism
redraw_area(0, 0, s.vdraw.width, s.vdraw.height);
BX_LOCK(fifo_mutex);
if (v->fbi.clut_dirty) {
update_pens();
}
BX_UNLOCK(fifo_mutex);
v->fbi.video_changed = 0;
s.vdraw.gui_update_pending = 1;
}

View File

@ -2106,8 +2106,10 @@ void register_w(Bit32u offset, Bit32u data, bool log)
int index = data >> 24;
if (index <= 32)
{
BX_LOCK(fifo_mutex);
v->fbi.clut[index] = data;
v->fbi.clut_dirty = 1;
BX_UNLOCK(fifo_mutex);
}
}
else