Core: Add patch loading stub
Jeffrey Pfau jeffrey@endrift.com
Wed, 03 Feb 2016 21:33:50 -0800
2 files changed,
12 insertions(+),
0 deletions(-)
M
src/core/core.h
→
src/core/core.h
@@ -48,6 +48,8 @@
bool (*loadBIOS)(struct mCore*, struct VFile* vf, int biosID); bool (*selectBIOS)(struct mCore*, int biosID); + bool (*loadPatch)(struct mCore*, struct VFile* vf); + void (*reset)(struct mCore*); void (*runFrame)(struct mCore*); void (*runLoop)(struct mCore*);@@ -66,5 +68,6 @@ };
bool mCoreLoadFile(struct mCore* core, const char* path); bool mCoreAutoloadSave(struct mCore* core); +bool mCoreAutoloadPatch(struct mCore* core); #endif
M
src/gb/core.c
→
src/gb/core.c
@@ -80,6 +80,14 @@ static bool _GBCoreLoadSave(struct mCore* core, struct VFile* vf) {
return GBLoadSave(core->board, vf); } +static bool _GBCoreLoadPatch(struct mCore* core, struct VFile* vf) { + // TODO + UNUSED(core); + UNUSED(vf); + mLOG(GB, STUB, "Patches are not yet supported"); + return false; +} + static void _GBCoreUnloadROM(struct mCore* core) { return GBUnloadROM(core->board); }@@ -153,6 +161,7 @@ core->setVideoBuffer = _GBCoreSetVideoBuffer;
core->isROM = GBIsROM; core->loadROM = _GBCoreLoadROM; core->loadSave = _GBCoreLoadSave; + core->loadPatch = _GBCoreLoadPatch; core->unloadROM = _GBCoreUnloadROM; core->reset = _GBCoreReset; core->runFrame = _GBCoreRunFrame;