all repos — mgba @ 93b85215a9efb6f446da0e9b402fcac0a60a20a5

mGBA Game Boy Advance Emulator

GBA: Don't include GBACLIDebugger struct unless needed
Jeffrey Pfau jeffrey@endrift.com
Mon, 22 Jun 2015 19:31:19 -0700
commit

93b85215a9efb6f446da0e9b402fcac0a60a20a5

parent

42a887369feb1533764418803d64006aee4e6f5e

2 files changed, 2 insertions(+), 8 deletions(-)

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

@@ -30,11 +30,9 @@ { "rewind", _rewind, CLIDVParse, "Rewind the emulation a number of recorded intervals" },

{ "save", _save, CLIDVParse, "Save a savestate" }, { 0, 0, 0, 0 } }; -#endif struct GBACLIDebugger* GBACLIDebuggerCreate(struct GBAThread* context) { struct GBACLIDebugger* debugger = malloc(sizeof(struct GBACLIDebugger)); -#ifdef USE_CLI_DEBUGGER debugger->d.init = _GBACLIDebuggerInit; debugger->d.deinit = _GBACLIDebuggerDeinit; debugger->d.custom = _GBACLIDebuggerCustom;

@@ -44,14 +42,10 @@ debugger->d.name = "Game Boy Advance";

debugger->d.commands = _GBACLIDebuggerCommands; debugger->context = context; -#else - UNUSED(context); -#endif return debugger; } -#ifdef USE_CLI_DEBUGGER static void _GBACLIDebuggerInit(struct CLIDebuggerSystem* debugger) { struct GBACLIDebugger* gbaDebugger = (struct GBACLIDebugger*) debugger;
M src/gba/supervisor/cli.hsrc/gba/supervisor/cli.h

@@ -6,21 +6,21 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */

#ifndef GBA_CLI_H #define GBA_CLI_H +#ifdef USE_CLI_DEBUGGER #include "debugger/cli-debugger.h" struct GBAThread; struct GBACLIDebugger { -#ifdef USE_CLI_DEBUGGER struct CLIDebuggerSystem d; struct GBAThread* context; bool frameAdvance; bool inVblank; -#endif }; struct GBACLIDebugger* GBACLIDebuggerCreate(struct GBAThread*); +#endif #endif