Deinit video when shutting down
Jeffrey Pfau jeffrey@endrift.com
Tue, 07 May 2013 01:00:18 -0700
3 files changed,
6 insertions(+),
0 deletions(-)
M
src/gba/gba-video.c
→
src/gba/gba-video.c
@@ -43,6 +43,10 @@ video->nextVblankIRQ = 0;
video->nextVcounterIRQ = 0; } +void GBAVideoDeinit(struct GBAVideo* video) { + GBAVideoAssociateRenderer(video, &dummyRenderer); +} + void GBAVideoAssociateRenderer(struct GBAVideo* video, struct GBAVideoRenderer* renderer) { video->renderer->deinit(video->renderer); video->renderer = renderer;
M
src/gba/gba-video.h
→
src/gba/gba-video.h
@@ -204,6 +204,7 @@ union GBAOAM oam;
}; void GBAVideoInit(struct GBAVideo* video); +void GBAVideoDeinit(struct GBAVideo* video); void GBAVideoAssociateRenderer(struct GBAVideo* video, struct GBAVideoRenderer* renderer); int32_t GBAVideoProcessEvents(struct GBAVideo* video, int32_t cycles);
M
src/gba/gba.c
→
src/gba/gba.c
@@ -52,6 +52,7 @@ }
void GBADeinit(struct GBA* gba) { GBAMemoryDeinit(&gba->memory); + GBAVideoDeinit(&gba->video); } void GBABoardInit(struct GBABoard* board) {