GB Video: Fix state loading

This commit is contained in:
Vicki Pfau 2020-07-15 01:50:37 -07:00
parent 746ee657d7
commit c3e048d5fb
1 changed files with 3 additions and 3 deletions

View File

@ -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);
}