Properly init and deinit renderers
Jeffrey Pfau jeffrey@endrift.com
Sat, 20 Apr 2013 16:47:04 -0700
1 files changed,
2 insertions(+),
0 deletions(-)
jump to
M
src/gba/gba-video.c
→
src/gba/gba-video.c
@@ -44,10 +44,12 @@ video->nextVcounterIRQ = 0;
} void GBAVideoAssociateRenderer(struct GBAVideo* video, struct GBAVideoRenderer* renderer) { + video->renderer->deinit(video->renderer); video->renderer = renderer; renderer->palette = video->palette; renderer->vram = video->vram; renderer->oam = &video->oam; + video->renderer->init(video->renderer); } int32_t GBAVideoProcessEvents(struct GBAVideo* video, int32_t cycles) {