GB Video: Fix proxy renderer for GBC

This commit is contained in:
Vicki Pfau 2017-04-18 02:11:24 -07:00
parent 3dbd49a307
commit 9b0a5e566e
1 changed files with 6 additions and 2 deletions

View File

@ -59,10 +59,14 @@ static void _init(struct GBVideoProxyRenderer* proxyRenderer) {
}
}
static void _reset(struct GBVideoProxyRenderer* proxyRenderer) {
static void _reset(struct GBVideoProxyRenderer* proxyRenderer, enum GBModel model) {
memcpy(proxyRenderer->logger->oam, &proxyRenderer->d.oam->raw, GB_SIZE_OAM);
memcpy(proxyRenderer->logger->vram, proxyRenderer->d.vram, GB_SIZE_VRAM);
proxyRenderer->backend->deinit(proxyRenderer->backend);
proxyRenderer->backend->init(proxyRenderer->backend, model);
mVideoLoggerRendererReset(proxyRenderer->logger);
}
@ -76,7 +80,7 @@ void GBVideoProxyRendererShim(struct GBVideo* video, struct GBVideoProxyRenderer
renderer->d.vram = video->vram;
renderer->d.oam = &video->oam;
_init(renderer);
_reset(renderer);
_reset(renderer, video->p->model);
}
void GBVideoProxyRendererUnshim(struct GBVideo* video, struct GBVideoProxyRenderer* renderer) {