all repos — mgba @ 9b0a5e566ec2de97baf5abbe0807922420e34006

mGBA Game Boy Advance Emulator

GB Video: Fix proxy renderer for GBC
Vicki Pfau vi@endrift.com
Tue, 18 Apr 2017 02:11:24 -0700
commit

9b0a5e566ec2de97baf5abbe0807922420e34006

parent

3dbd49a307fb7f0725b9b7481445578fdf820284

1 files changed, 6 insertions(+), 2 deletions(-)

jump to
M src/gb/renderers/proxy.csrc/gb/renderers/proxy.c

@@ -59,9 +59,13 @@ proxyRenderer->backend->cache = NULL;

} } -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 @@ renderer->d.cache = renderer->backend->cache;

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) {