diff --git a/CMakeLists.txt b/CMakeLists.txt index 90222c0f9..e5490a04b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -54,8 +54,10 @@ file(GLOB UTIL_TEST_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/util/test/*.c) file(GLOB GUI_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/util/gui/*.c ${CMAKE_CURRENT_SOURCE_DIR}/src/feature/gui/*.c) file(GLOB GBA_RENDERER_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/gba/renderers/*.c) file(GLOB GBA_SIO_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/gba/sio/lockstep.c) +file(GLOB GBA_EXTRA_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/gba/extra/*.c) file(GLOB GB_SIO_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/gb/sio/lockstep.c) file(GLOB GB_RENDERER_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/gb/renderers/*.c) +file(GLOB GB_EXTRA_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/gb/extra/*.c) file(GLOB THIRD_PARTY_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/third-party/inih/*.c) file(GLOB EXTRA_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/feature/*.c) set(CORE_VFS_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/util/vfs/vfs-mem.c) @@ -600,7 +602,7 @@ if(M_CORE_GB) list(APPEND DEBUGGER_SRC ${CMAKE_CURRENT_SOURCE_DIR}/src/lr35902/debugger/cli-debugger.c ${CMAKE_CURRENT_SOURCE_DIR}/src/lr35902/debugger/debugger.c - ${CMAKE_CURRENT_SOURCE_DIR}/src/gb/extra/cli.c) + ${CMAKE_CURRENT_SOURCE_DIR}/src/gb/debugger/cli.c) list(APPEND TEST_SRC ${LR35902_TEST_SRC} ${GB_TEST_SRC}) @@ -617,7 +619,7 @@ if(M_CORE_GBA) ${CMAKE_CURRENT_SOURCE_DIR}/src/arm/debugger/cli-debugger.c ${CMAKE_CURRENT_SOURCE_DIR}/src/arm/debugger/debugger.c ${CMAKE_CURRENT_SOURCE_DIR}/src/arm/debugger/memory-debugger.c - ${CMAKE_CURRENT_SOURCE_DIR}/src/gba/extra/cli.c) + ${CMAKE_CURRENT_SOURCE_DIR}/src/gba/debugger/cli.c) list(APPEND TEST_SRC ${ARM_TEST_SRC} ${GBA_TEST_SRC}) @@ -670,6 +672,7 @@ if(NOT MINIMAL_CORE) endif() if(M_CORE_GB) list(APPEND SRC + ${GB_EXTRA_SRC} ${GB_SIO_SRC}) endif() list(APPEND SRC diff --git a/include/mgba/core/core.h b/include/mgba/core/core.h index 170634bc2..f7238f861 100644 --- a/include/mgba/core/core.h +++ b/include/mgba/core/core.h @@ -147,8 +147,10 @@ struct mCore { void (*enableVideoLayer)(struct mCore*, size_t id, bool enable); void (*enableAudioChannel)(struct mCore*, size_t id, bool enable); +#ifndef MINIMAL_CORE void (*startVideoLog)(struct mCore*, struct mVideoLogContext*); void (*endVideoLog)(struct mCore*); +#endif }; #if !defined(MINIMAL_CORE) || MINIMAL_CORE < 2 diff --git a/include/mgba/gb/core.h b/include/mgba/gb/core.h index 621bfe956..90ddccad6 100644 --- a/include/mgba/gb/core.h +++ b/include/mgba/gb/core.h @@ -12,7 +12,9 @@ CXX_GUARD_START struct mCore; struct mCore* GBCoreCreate(void); +#ifndef MINIMAL_CORE struct mCore* GBVideoLogPlayerCreate(void); +#endif CXX_GUARD_END diff --git a/include/mgba/gba/core.h b/include/mgba/gba/core.h index 65a19f447..5cb0e468c 100644 --- a/include/mgba/gba/core.h +++ b/include/mgba/gba/core.h @@ -12,7 +12,9 @@ CXX_GUARD_START struct mCore; struct mCore* GBACoreCreate(void); +#ifndef MINIMAL_CORE struct mCore* GBAVideoLogPlayerCreate(void); +#endif CXX_GUARD_END diff --git a/src/gb/core.c b/src/gb/core.c index 5bef4b658..cd77c6f33 100644 --- a/src/gb/core.c +++ b/src/gb/core.c @@ -747,8 +747,10 @@ struct mCore* GBCoreCreate(void) { core->listAudioChannels = _GBCoreListAudioChannels; core->enableVideoLayer = _GBCoreEnableVideoLayer; core->enableAudioChannel = _GBCoreEnableAudioChannel; +#ifndef MINIMAL_CORE core->startVideoLog = _GBCoreStartVideoLog; core->endVideoLog = _GBCoreEndVideoLog; +#endif return core; } diff --git a/src/gb/extra/cli.c b/src/gb/debugger/cli.c similarity index 100% rename from src/gb/extra/cli.c rename to src/gb/debugger/cli.c diff --git a/src/gb/renderers/proxy.c b/src/gb/extra/proxy.c similarity index 100% rename from src/gb/renderers/proxy.c rename to src/gb/extra/proxy.c diff --git a/src/gba/core.c b/src/gba/core.c index 5564fa784..522c8a41b 100644 --- a/src/gba/core.c +++ b/src/gba/core.c @@ -766,8 +766,10 @@ struct mCore* GBACoreCreate(void) { core->listAudioChannels = _GBACoreListAudioChannels; core->enableVideoLayer = _GBACoreEnableVideoLayer; core->enableAudioChannel = _GBACoreEnableAudioChannel; +#ifndef MINIMAL_CORE core->startVideoLog = _GBACoreStartVideoLog; core->endVideoLog = _GBACoreEndVideoLog; +#endif return core; } diff --git a/src/gba/extra/cli.c b/src/gba/debugger/cli.c similarity index 100% rename from src/gba/extra/cli.c rename to src/gba/debugger/cli.c diff --git a/src/gba/renderers/proxy.c b/src/gba/extra/proxy.c similarity index 100% rename from src/gba/renderers/proxy.c rename to src/gba/extra/proxy.c