mirror of https://github.com/mgba-emu/mgba.git
Fix OAM deserialization
This commit is contained in:
parent
941c629f8b
commit
668c4f68b7
|
@ -204,8 +204,10 @@ void GBAVideoSerialize(struct GBAVideo* video, struct GBASerializedState* state)
|
||||||
|
|
||||||
void GBAVideoDeserialize(struct GBAVideo* video, struct GBASerializedState* state) {
|
void GBAVideoDeserialize(struct GBAVideo* video, struct GBASerializedState* state) {
|
||||||
memcpy(video->renderer->vram, state->vram, SIZE_VRAM);
|
memcpy(video->renderer->vram, state->vram, SIZE_VRAM);
|
||||||
memcpy(video->oam.raw, state->oam, SIZE_OAM);
|
|
||||||
int i;
|
int i;
|
||||||
|
for (i = 0; i < SIZE_OAM; i += 2) {
|
||||||
|
GBAStore16(&video->p->memory.d, BASE_OAM | i, state->oam[i >> 1], 0);
|
||||||
|
}
|
||||||
for (i = 0; i < SIZE_PALETTE_RAM; i += 2) {
|
for (i = 0; i < SIZE_PALETTE_RAM; i += 2) {
|
||||||
GBAStore16(&video->p->memory.d, BASE_PALETTE_RAM | i, state->pram[i >> 1], 0);
|
GBAStore16(&video->p->memory.d, BASE_PALETTE_RAM | i, state->pram[i >> 1], 0);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue