all repos — mgba @ e45519075a4bd3d54d0f30e41792a7973287c789

mGBA Game Boy Advance Emulator

All: Cleanup
Vicki Pfau vi@endrift.com
Tue, 04 Sep 2018 18:28:55 -0700
commit

e45519075a4bd3d54d0f30e41792a7973287c789

parent

e12db1e9d8db34cc6cc070a5d4b2f00d1c42fb78

M CMakeLists.txtCMakeLists.txt

@@ -954,7 +954,7 @@ add_executable(${BINARY_NAME}-example-server ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/example/client-server/server.c)

target_link_libraries(${BINARY_NAME}-example-server ${BINARY_NAME}) set_target_properties(${BINARY_NAME}-example-server PROPERTIES COMPILE_DEFINITIONS "${OS_DEFINES};${FEATURE_DEFINES};${FUNCTION_DEFINES}") - if(FOUND_SDL) + if(SDL_FOUND) add_executable(${BINARY_NAME}-example-client ${CMAKE_CURRENT_SOURCE_DIR}/src/platform/example/client-server/client.c) target_link_libraries(${BINARY_NAME}-example-client ${BINARY_NAME} ${SDL_LIBRARY} ${SDLMAIN_LIBRARY} ${OPENGL_LIBRARY} ${OPENGLES2_LIBRARY}) set_target_properties(${BINARY_NAME}-example-client PROPERTIES

@@ -1058,8 +1058,7 @@ cpack_add_component_group(qt PARENT_GROUP base)

cpack_add_component(${BINARY_NAME}-qt GROUP qt) endif() -if(SDL_VERSION) - message(STATUS Hi) +if(SDL_FOUND) cpack_add_component_group(sdl PARENT_GROUP base) cpack_add_component(${BINARY_NAME}-sdl GROUP sdl) endif()
M src/core/mem-search.csrc/core/mem-search.c

@@ -20,6 +20,7 @@ case mCORE_MEMORY_SEARCH_EQUAL:

case mCORE_MEMORY_SEARCH_DELTA: return value == match; } + return false; } static size_t _search32(const void* mem, size_t size, const struct mCoreMemoryBlock* block, uint32_t value32, enum mCoreMemorySearchOp op, struct mCoreMemorySearchResults* out, size_t limit) {

@@ -213,6 +214,7 @@ return _searchStr(mem, size, block, params->valueStr, params->width, out, limit);

case mCORE_MEMORY_SEARCH_GUESS: return _searchGuess(mem, size, block, params, out, limit); } + return 0; } void mCoreMemorySearch(struct mCore* core, const struct mCoreMemorySearchParams* params, struct mCoreMemorySearchResults* out, size_t limit) {
M src/feature/gui/gui-runner.csrc/feature/gui/gui-runner.c

@@ -89,6 +89,8 @@ }

if (!strncmp(ext, "ss", 2)) { return false; } + + return true; } static void _drawBackground(struct GUIBackground* background, void* context) {
M src/feature/thread-proxy.csrc/feature/thread-proxy.c

@@ -7,7 +7,6 @@ #include <mgba/feature/thread-proxy.h>

#include <mgba/core/tile-cache.h> #include <mgba/internal/gba/gba.h> -#include <mgba/internal/gba/io.h> #ifndef DISABLE_THREADING
M src/gb/gb.csrc/gb/gb.c

@@ -478,6 +478,7 @@

switch (gb->model) { case GB_MODEL_AUTODETECT: // Silence warnings gb->model = GB_MODEL_DMG; + // Fall through case GB_MODEL_DMG: cpu->a = 1; cpu->f.packed = 0xB0;
M src/gba/core.csrc/gba/core.c

@@ -128,7 +128,6 @@ struct mVideoLogContext* logContext;

struct mCoreCallbacks logCallbacks; #ifndef DISABLE_THREADING struct mVideoThreadProxy threadProxy; - int threadedVideo; #endif int keys; struct mCPUComponent* components[CPU_COMPONENT_MAX];

@@ -168,7 +167,6 @@ GBAVideoSoftwareRendererCreate(&gbacore->renderer);

gbacore->renderer.outputBuffer = NULL; #ifndef DISABLE_THREADING - gbacore->threadedVideo = false; mVideoThreadProxyCreate(&gbacore->threadProxy); #endif gbacore->proxyRenderer.logger = NULL;

@@ -244,7 +242,7 @@

mCoreConfigCopyValue(&core->config, config, "gba.bios"); #ifndef DISABLE_THREADING - mCoreConfigGetIntValue(config, "threadedVideo", &gbacore->threadedVideo); + mCoreConfigCopyValue(&core->config, config, "threadedVideo"); #endif }

@@ -386,7 +384,8 @@ struct GBA* gba = (struct GBA*) core->board;

if (gbacore->renderer.outputBuffer) { struct GBAVideoRenderer* renderer = &gbacore->renderer.d; #ifndef DISABLE_THREADING - if (gbacore->threadedVideo) { + int fakeBool; + if (mCoreConfigGetIntValue(&core->config, "threadedVideo", &fakeBool) && fakeBool) { gbacore->proxyRenderer.logger = &gbacore->threadProxy.d; GBAVideoProxyRendererCreate(&gbacore->proxyRenderer, renderer); renderer = &gbacore->proxyRenderer.d;

@@ -846,6 +845,7 @@ gba->audio.psg.forceDisableCh[id] = !enable;

break; case 4: gba->audio.forceDisableChA = !enable; + break; case 5: gba->audio.forceDisableChB = !enable; break;
M src/gba/gba.csrc/gba/gba.c

@@ -45,9 +45,10 @@ static void GBAHitStub(struct ARMCore* cpu, uint32_t opcode);

static void GBAIllegal(struct ARMCore* cpu, uint32_t opcode); static void GBABreakpoint(struct ARMCore* cpu, int immediate); +#ifdef USE_DEBUGGERS static bool _setSoftwareBreakpoint(struct ARMDebugger*, uint32_t address, enum ExecutionMode mode, uint32_t* opcode); static bool _clearSoftwareBreakpoint(struct ARMDebugger*, uint32_t address, enum ExecutionMode mode, uint32_t opcode); - +#endif #ifdef FIXED_ROM_BUFFER extern uint32_t* romBuffer;

@@ -706,6 +707,7 @@ }

void GBAHitStub(struct ARMCore* cpu, uint32_t opcode) { struct GBA* gba = (struct GBA*) cpu->master; + UNUSED(gba); #ifdef USE_DEBUGGERS if (gba->debugger) { struct mDebuggerEntryInfo info = {

@@ -889,6 +891,7 @@ GBAPatch16(gba->cpu, address, opcode, 0);

} } +#ifdef USE_DEBUGGERS static bool _setSoftwareBreakpoint(struct ARMDebugger* debugger, uint32_t address, enum ExecutionMode mode, uint32_t* opcode) { GBASetBreakpoint((struct GBA*) debugger->cpu->master, &debugger->d.p->d, address, mode, opcode); return true;

@@ -898,3 +901,4 @@ static bool _clearSoftwareBreakpoint(struct ARMDebugger* debugger, uint32_t address, enum ExecutionMode mode, uint32_t opcode) {

GBAClearBreakpoint((struct GBA*) debugger->cpu->master, address, mode, opcode); return true; } +#endif
M src/gba/memory.csrc/gba/memory.c

@@ -365,6 +365,7 @@ } else { \

value <<= 16; \ value |= cpu->prefetch[0]; \ } \ + break; \ default: \ value |= value << 16; \ } \
M src/platform/sdl/CMakeLists.txtsrc/platform/sdl/CMakeLists.txt

@@ -8,6 +8,7 @@ set(SDL_INCLUDE_DIR ${SDL2_INCLUDE_DIRS})

set(SDL_LIBRARY ${SDL2_LIBRARIES}) link_directories(${SDL2_LIBDIR}) set(SDL_VERSION_DEBIAN "2-2.0-0") + set(SDL_FOUND ON PARENT_SCOPE) endif() endif()