mirror of https://github.com/mgba-emu/mgba.git
Deinit video when shutting down
This commit is contained in:
parent
8bc5ec4222
commit
db96be98dc
|
@ -43,6 +43,10 @@ void GBAVideoInit(struct GBAVideo* video) {
|
||||||
video->nextVcounterIRQ = 0;
|
video->nextVcounterIRQ = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void GBAVideoDeinit(struct GBAVideo* video) {
|
||||||
|
GBAVideoAssociateRenderer(video, &dummyRenderer);
|
||||||
|
}
|
||||||
|
|
||||||
void GBAVideoAssociateRenderer(struct GBAVideo* video, struct GBAVideoRenderer* renderer) {
|
void GBAVideoAssociateRenderer(struct GBAVideo* video, struct GBAVideoRenderer* renderer) {
|
||||||
video->renderer->deinit(video->renderer);
|
video->renderer->deinit(video->renderer);
|
||||||
video->renderer = renderer;
|
video->renderer = renderer;
|
||||||
|
|
|
@ -204,6 +204,7 @@ struct GBAVideo {
|
||||||
};
|
};
|
||||||
|
|
||||||
void GBAVideoInit(struct GBAVideo* video);
|
void GBAVideoInit(struct GBAVideo* video);
|
||||||
|
void GBAVideoDeinit(struct GBAVideo* video);
|
||||||
void GBAVideoAssociateRenderer(struct GBAVideo* video, struct GBAVideoRenderer* renderer);
|
void GBAVideoAssociateRenderer(struct GBAVideo* video, struct GBAVideoRenderer* renderer);
|
||||||
int32_t GBAVideoProcessEvents(struct GBAVideo* video, int32_t cycles);
|
int32_t GBAVideoProcessEvents(struct GBAVideo* video, int32_t cycles);
|
||||||
|
|
||||||
|
|
|
@ -52,6 +52,7 @@ void GBAInit(struct GBA* gba) {
|
||||||
|
|
||||||
void GBADeinit(struct GBA* gba) {
|
void GBADeinit(struct GBA* gba) {
|
||||||
GBAMemoryDeinit(&gba->memory);
|
GBAMemoryDeinit(&gba->memory);
|
||||||
|
GBAVideoDeinit(&gba->video);
|
||||||
}
|
}
|
||||||
|
|
||||||
void GBABoardInit(struct GBABoard* board) {
|
void GBABoardInit(struct GBABoard* board) {
|
||||||
|
|
Loading…
Reference in New Issue