all repos — mgba @ ef29028109e9ebc57138b389ae5d77018a35012e

mGBA Game Boy Advance Emulator

DS: Modernize a bit
Jeffrey Pfau jeffrey@endrift.com
Mon, 26 Dec 2016 00:46:12 -0800
commit

ef29028109e9ebc57138b389ae5d77018a35012e

parent

0c5ce511fb7f6c7f8da27638752dd574e413d8ed

3 files changed, 4 insertions(+), 13 deletions(-)

jump to
M src/ds/core.csrc/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 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 @@ return dscore->debuggerPlatform;

} 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 @@ core->putPixels = _DSCorePutPixels;

core->getAudioChannel = _DSCoreGetAudioChannel; core->setAudioBufferSize = _DSCoreSetAudioBufferSize; core->getAudioBufferSize = _DSCoreGetAudioBufferSize; + core->setCoreCallbacks = _DSCoreSetCoreCallbacks; core->setAVStream = _DSCoreSetAVStream; core->isROM = DSIsROM; core->loadROM = _DSCoreLoadROM;
M src/ds/extra/cli.csrc/ds/extra/cli.c

@@ -10,8 +10,6 @@ #include "core/core.h"

#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 @@ }

debugger->d.platform->init(core->cpu, debugger->d.platform); debugger->system->printStatus(debugger->system); } - -#endif
M src/ds/extra/cli.hsrc/ds/extra/cli.h

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

#ifndef DS_CLI_H #define DS_CLI_H -#ifdef USE_CLI_DEBUGGER #include "debugger/cli-debugger.h" struct mCore;

@@ -21,6 +20,5 @@ bool inVblank;

}; struct DSCLIDebugger* DSCLIDebuggerCreate(struct mCore*); -#endif #endif