Fixed unintentional delay in NR50 and NR51’s effects

This commit is contained in:
Lior Halphon 2018-01-19 19:56:39 +02:00
parent 37906bcd1f
commit 09dd47c6de
1 changed files with 1 additions and 0 deletions

View File

@ -469,6 +469,7 @@ void GB_apu_write(GB_gameboy_t *gb, uint8_t reg, uint8_t value)
/* Globals */
case GB_IO_NR50:
case GB_IO_NR51:
gb->io_registers[reg] = value;
/* These registers affect the output of all 4 channels (but not the output of the PCM registers).*/
/* We call update_samples with the current value so the APU output is updated with the new outputs */
for (unsigned i = GB_N_CHANNELS; i--;) {