all repos — mgba @ db96be98dcd40796597d96afe4776b7f4ceff928

mGBA Game Boy Advance Emulator

Deinit video when shutting down
Jeffrey Pfau jeffrey@endrift.com
Tue, 07 May 2013 01:00:18 -0700
commit

db96be98dcd40796597d96afe4776b7f4ceff928

parent

8bc5ec422285bb84b3d133830f4d5e0ecc5742bd

3 files changed, 6 insertions(+), 0 deletions(-)

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

@@ -52,6 +52,7 @@ }

void GBADeinit(struct GBA* gba) { GBAMemoryDeinit(&gba->memory); + GBAVideoDeinit(&gba->video); } void GBABoardInit(struct GBABoard* board) {