GBA Context: Have a component list

This commit is contained in:
Jeffrey Pfau 2015-08-23 05:19:42 -07:00
parent f4a1a7f7db
commit 719895c2d2
2 changed files with 3 additions and 1 deletions

View File

@ -16,6 +16,7 @@ bool GBAContextInit(struct GBAContext* context, const char* port) {
context->rom = 0; context->rom = 0;
context->save = 0; context->save = 0;
context->renderer = 0; context->renderer = 0;
memset(context->components, 0, sizeof(context->components));
if (!context->gba || !context->cpu) { if (!context->gba || !context->cpu) {
if (context->gba) { if (context->gba) {
@ -33,7 +34,7 @@ bool GBAContextInit(struct GBAContext* context, const char* port) {
} }
GBACreate(context->gba); GBACreate(context->gba);
ARMSetComponents(context->cpu, &context->gba->d, 0, 0); ARMSetComponents(context->cpu, &context->gba->d, 0, context->components);
ARMInit(context->cpu); ARMInit(context->cpu);
context->gba->sync = 0; context->gba->sync = 0;

View File

@ -18,6 +18,7 @@ struct GBAContext {
struct VFile* rom; struct VFile* rom;
struct VFile* save; struct VFile* save;
struct VFile* bios; struct VFile* bios;
struct ARMComponent* components[GBA_COMPONENT_MAX];
struct GBAConfig config; struct GBAConfig config;
struct GBAOptions opts; struct GBAOptions opts;
struct GBAInputMap inputMap; struct GBAInputMap inputMap;