From ef29028109e9ebc57138b389ae5d77018a35012e Mon Sep 17 00:00:00 2001 From: Jeffrey Pfau Date: Mon, 26 Dec 2016 00:46:12 -0800 Subject: [PATCH] DS: Modernize a bit --- src/ds/core.c | 11 ++++------- src/ds/extra/cli.c | 4 ---- src/ds/extra/cli.h | 2 -- 3 files changed, 4 insertions(+), 13 deletions(-) diff --git a/src/ds/core.c b/src/ds/core.c index b3a85c1f4..58bcb271f 100644 --- a/src/ds/core.c +++ b/src/ds/core.c @@ -133,6 +133,9 @@ static size_t _DSCoreGetAudioBufferSize(struct mCore* core) { return 2048; } +static void _DSCoreSetCoreCallbacks(struct mCore* core, struct mCoreCallbacks* coreCallbacks) { +} + static void _DSCoreSetAVStream(struct mCore* core, struct mAVStream* stream) { } @@ -333,10 +336,8 @@ static void _DSCoreRawWrite32(struct mCore* core, uint32_t address, int segment, static bool _DSCoreSupportsDebuggerType(struct mCore* core, enum mDebuggerType type) { UNUSED(core); switch (type) { -#ifdef USE_CLI_DEBUGGER case DEBUGGER_CLI: return true; -#endif #ifdef USE_GDB_STUB case DEBUGGER_GDB: return true; @@ -355,12 +356,7 @@ static struct mDebuggerPlatform* _DSCoreDebuggerPlatform(struct mCore* core) { } static struct CLIDebuggerSystem* _DSCoreCliDebuggerSystem(struct mCore* core) { -#ifdef USE_CLI_DEBUGGER return &DSCLIDebuggerCreate(core)->d; -#else - UNUSED(core); - return NULL; -#endif } static void _DSCoreAttachDebugger(struct mCore* core, struct mDebugger* debugger) { @@ -407,6 +403,7 @@ struct mCore* DSCoreCreate(void) { core->getAudioChannel = _DSCoreGetAudioChannel; core->setAudioBufferSize = _DSCoreSetAudioBufferSize; core->getAudioBufferSize = _DSCoreGetAudioBufferSize; + core->setCoreCallbacks = _DSCoreSetCoreCallbacks; core->setAVStream = _DSCoreSetAVStream; core->isROM = DSIsROM; core->loadROM = _DSCoreLoadROM; diff --git a/src/ds/extra/cli.c b/src/ds/extra/cli.c index 841b9027d..ffeddeb6a 100644 --- a/src/ds/extra/cli.c +++ b/src/ds/extra/cli.c @@ -10,8 +10,6 @@ #include "ds/core.h" #include "ds/ds.h" -#ifdef USE_CLI_DEBUGGER - static void _DSCLIDebuggerInit(struct CLIDebuggerSystem*); static bool _DSCLIDebuggerCustom(struct CLIDebuggerSystem*); static uint32_t _DSCLIDebuggerLookupIdentifier(struct CLIDebuggerSystem*, const char* name, struct CLIDebugVector* dv); @@ -79,5 +77,3 @@ static void _switchCpu(struct CLIDebugger* debugger, struct CLIDebugVector* dv) debugger->d.platform->init(core->cpu, debugger->d.platform); debugger->system->printStatus(debugger->system); } - -#endif diff --git a/src/ds/extra/cli.h b/src/ds/extra/cli.h index 4701dc0ad..19f6afd91 100644 --- a/src/ds/extra/cli.h +++ b/src/ds/extra/cli.h @@ -6,7 +6,6 @@ #ifndef DS_CLI_H #define DS_CLI_H -#ifdef USE_CLI_DEBUGGER #include "debugger/cli-debugger.h" struct mCore; @@ -21,6 +20,5 @@ struct DSCLIDebugger { }; struct DSCLIDebugger* DSCLIDebuggerCreate(struct mCore*); -#endif #endif