From 719895c2d2c89842f332003a3866dbb573e76d2b Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Sun, 23 Aug 2015 05:19:42 -0700 Subject: [PATCH] GBA Context: Have a component list --- src/gba/supervisor/context.c | 3 ++- src/gba/supervisor/context.h | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/gba/supervisor/context.c b/src/gba/supervisor/context.c index c4161c763..6a42be653 100644 --- a/src/gba/supervisor/context.c +++ b/src/gba/supervisor/context.c @@ -16,6 +16,7 @@ bool GBAContextInit(struct GBAContext* context, const char* port) { context->rom = 0; context->save = 0; context->renderer = 0; + memset(context->components, 0, sizeof(context->components)); if (!context->gba || !context->cpu) { if (context->gba) { @@ -33,7 +34,7 @@ bool GBAContextInit(struct GBAContext* context, const char* port) { } GBACreate(context->gba); - ARMSetComponents(context->cpu, &context->gba->d, 0, 0); + ARMSetComponents(context->cpu, &context->gba->d, 0, context->components); ARMInit(context->cpu); context->gba->sync = 0; diff --git a/src/gba/supervisor/context.h b/src/gba/supervisor/context.h index 15b4d3949..867ce6cc6 100644 --- a/src/gba/supervisor/context.h +++ b/src/gba/supervisor/context.h @@ -18,6 +18,7 @@ struct GBAContext { struct VFile* rom; struct VFile* save; struct VFile* bios; + struct ARMComponent* components[GBA_COMPONENT_MAX]; struct GBAConfig config; struct GBAOptions opts; struct GBAInputMap inputMap;