DS: Modernize a bit

This commit is contained in:
Jeffrey Pfau 2016-12-26 00:46:12 -08:00
parent 0c5ce511fb
commit ef29028109
3 changed files with 4 additions and 13 deletions

View File

@ -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;

View File

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

View File

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