mirror of https://github.com/mgba-emu/mgba.git
GB Video: Fix state loading
This commit is contained in:
parent
746ee657d7
commit
c3e048d5fb
|
@ -894,6 +894,9 @@ void GBVideoDeserialize(struct GBVideo* video, const struct GBSerializedState* s
|
|||
mTimingSchedule(&video->p->timing, &video->frameEvent, when);
|
||||
}
|
||||
|
||||
video->renderer->deinit(video->renderer);
|
||||
video->renderer->init(video->renderer, video->p->model, video->sgbBorders);
|
||||
|
||||
size_t i;
|
||||
for (i = 0; i < 64; ++i) {
|
||||
LOAD_16LE(video->palette[i], i * 2, state->video.palette);
|
||||
|
@ -905,7 +908,4 @@ void GBVideoDeserialize(struct GBVideo* video, const struct GBSerializedState* s
|
|||
|
||||
_cleanOAM(video, video->ly);
|
||||
GBVideoSwitchBank(video, video->vramCurrentBank);
|
||||
|
||||
video->renderer->deinit(video->renderer);
|
||||
video->renderer->init(video->renderer, video->p->model, video->sgbBorders);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue