mirror of https://github.com/mgba-emu/mgba.git
GBA: Don't include GBACLIDebugger struct unless needed
This commit is contained in:
parent
42a887369f
commit
93b85215a9
|
@ -30,11 +30,9 @@ struct CLIDebuggerCommandSummary _GBACLIDebuggerCommands[] = {
|
|||
{ "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 @@ struct GBACLIDebugger* GBACLIDebuggerCreate(struct GBAThread* context) {
|
|||
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;
|
||||
|
||||
|
|
|
@ -6,21 +6,21 @@
|
|||
#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
|
||||
|
|
Loading…
Reference in New Issue