mirror of https://github.com/mgba-emu/mgba.git
GB Serialize: Fix audio channel 2 and 3 loading
This commit is contained in:
parent
f66c17533b
commit
4f75c1441c
|
@ -710,14 +710,14 @@ void GBIODeserialize(struct GB* gb, const struct GBSerializedState* state) {
|
|||
gb->audio.ch1.control.stop = GBAudioRegisterControlGetStop(gb->memory.io[REG_NR14] << 8);
|
||||
GBIOWrite(gb, REG_NR21, gb->memory.io[REG_NR21]);
|
||||
GBIOWrite(gb, REG_NR22, gb->memory.io[REG_NR22]);
|
||||
GBIOWrite(gb, REG_NR22, gb->memory.io[REG_NR23]);
|
||||
GBIOWrite(gb, REG_NR23, gb->memory.io[REG_NR23]);
|
||||
gb->audio.ch2.control.frequency &= 0xFF;
|
||||
gb->audio.ch2.control.frequency |= GBAudioRegisterControlGetFrequency(gb->memory.io[REG_NR24] << 8);
|
||||
gb->audio.ch2.control.stop = GBAudioRegisterControlGetStop(gb->memory.io[REG_NR24] << 8);
|
||||
GBIOWrite(gb, REG_NR30, gb->memory.io[REG_NR30]);
|
||||
GBIOWrite(gb, REG_NR31, gb->memory.io[REG_NR31]);
|
||||
GBIOWrite(gb, REG_NR32, gb->memory.io[REG_NR32]);
|
||||
GBIOWrite(gb, REG_NR32, gb->memory.io[REG_NR33]);
|
||||
GBIOWrite(gb, REG_NR33, gb->memory.io[REG_NR33]);
|
||||
gb->audio.ch3.rate &= 0xFF;
|
||||
gb->audio.ch3.rate |= GBAudioRegisterControlGetRate(gb->memory.io[REG_NR34] << 8);
|
||||
gb->audio.ch3.stop = GBAudioRegisterControlGetStop(gb->memory.io[REG_NR34] << 8);
|
||||
|
|
Loading…
Reference in New Issue