mirror of https://github.com/mgba-emu/mgba.git
GBA Video: Render resets should reload state
This commit is contained in:
parent
a97276b3a0
commit
ef742cb128
|
@ -91,8 +91,10 @@ static void GBAVideoSoftwareRendererReset(struct GBAVideoRenderer* renderer) {
|
|||
softwareRenderer->target2Obj = 0;
|
||||
softwareRenderer->target2Bd = 0;
|
||||
softwareRenderer->blendEffect = BLEND_NONE;
|
||||
memset(softwareRenderer->normalPalette, 0, sizeof(softwareRenderer->normalPalette));
|
||||
memset(softwareRenderer->variantPalette, 0, sizeof(softwareRenderer->variantPalette));
|
||||
for (i = 0; i < 1024; i += 2) {
|
||||
GBAVideoSoftwareRendererWritePalette(renderer, i, softwareRenderer->d.palette[i >> 1]);
|
||||
}
|
||||
_updatePalettes(softwareRenderer);
|
||||
|
||||
softwareRenderer->blda = 0;
|
||||
softwareRenderer->bldb = 0;
|
||||
|
|
|
@ -198,9 +198,9 @@ bool GBADeserialize(struct GBA* gba, const struct GBASerializedState* state) {
|
|||
}
|
||||
}
|
||||
|
||||
GBAVideoDeserialize(&gba->video, state);
|
||||
GBAMemoryDeserialize(&gba->memory, state);
|
||||
GBAIODeserialize(gba, state);
|
||||
GBAVideoDeserialize(&gba->video, state);
|
||||
GBAAudioDeserialize(&gba->audio, state);
|
||||
GBASavedataDeserialize(&gba->memory.savedata, state);
|
||||
|
||||
|
|
|
@ -334,4 +334,5 @@ void GBAVideoDeserialize(struct GBAVideo* video, const struct GBASerializedState
|
|||
LOAD_32(video->nextVcounterIRQ, 0, &state->video.nextVcounterIRQ);
|
||||
LOAD_32(video->frameCounter, 0, &state->video.frameCounter);
|
||||
LOAD_16(video->vcount, REG_VCOUNT, state->io);
|
||||
video->renderer->reset(video->renderer);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue