all repos — mgba @ 0bfb77106bf5f9d92b72089e8c3c639320fe2cab

mGBA Game Boy Advance Emulator

Properly init and deinit renderers
Jeffrey Pfau jeffrey@endrift.com
Sat, 20 Apr 2013 16:47:04 -0700
commit

0bfb77106bf5f9d92b72089e8c3c639320fe2cab

parent

b4cee4c2862758582fcb1dc25d202d4d5bbcaf2c

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

jump to
M src/gba/gba-video.csrc/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) {