all repos — mgba @ 719895c2d2c89842f332003a3866dbb573e76d2b

mGBA Game Boy Advance Emulator

GBA Context: Have a component list
Jeffrey Pfau jeffrey@endrift.com
Sun, 23 Aug 2015 05:19:42 -0700
commit

719895c2d2c89842f332003a3866dbb573e76d2b

parent

f4a1a7f7dbf62812820004923ab42ab3b645d5b8

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

jump to
M src/gba/supervisor/context.csrc/gba/supervisor/context.c

@@ -16,6 +16,7 @@ context->cpu = anonymousMemoryMap(sizeof(struct ARMCore));

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 @@ GBAConfigLoad(&context->config);

} 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;
M src/gba/supervisor/context.hsrc/gba/supervisor/context.h

@@ -18,6 +18,7 @@ struct GBAVideoRenderer* renderer;

struct VFile* rom; struct VFile* save; struct VFile* bios; + struct ARMComponent* components[GBA_COMPONENT_MAX]; struct GBAConfig config; struct GBAOptions opts; struct GBAInputMap inputMap;