All: Cleanup

This commit is contained in:
Vicki Pfau 2018-09-04 18:28:55 -07:00
parent e12db1e9d8
commit e45519075a
9 changed files with 18 additions and 9 deletions

View File

@ -954,7 +954,7 @@ if(BUILD_EXAMPLE)
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 @@ if(BUILD_QT)
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()

View File

@ -20,6 +20,7 @@ static bool _op(int32_t value, int32_t match, enum mCoreMemorySearchOp op) {
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 @@ static size_t _search(const void* mem, size_t size, const struct mCoreMemoryBloc
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) {

View File

@ -89,6 +89,8 @@ static bool _testExtensions(const char* name) {
if (!strncmp(ext, "ss", 2)) {
return false;
}
return true;
}
static void _drawBackground(struct GUIBackground* background, void* context) {

View File

@ -7,7 +7,6 @@
#include <mgba/core/tile-cache.h>
#include <mgba/internal/gba/gba.h>
#include <mgba/internal/gba/io.h>
#ifndef DISABLE_THREADING

View File

@ -478,6 +478,7 @@ void GBSkipBIOS(struct GB* gb) {
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;

View File

@ -128,7 +128,6 @@ struct GBACore {
struct mCoreCallbacks logCallbacks;
#ifndef DISABLE_THREADING
struct mVideoThreadProxy threadProxy;
int threadedVideo;
#endif
int keys;
struct mCPUComponent* components[CPU_COMPONENT_MAX];
@ -168,7 +167,6 @@ static bool _GBACoreInit(struct mCore* core) {
gbacore->renderer.outputBuffer = NULL;
#ifndef DISABLE_THREADING
gbacore->threadedVideo = false;
mVideoThreadProxyCreate(&gbacore->threadProxy);
#endif
gbacore->proxyRenderer.logger = NULL;
@ -244,7 +242,7 @@ static void _GBACoreLoadConfig(struct mCore* core, const struct mCoreConfig* con
mCoreConfigCopyValue(&core->config, config, "gba.bios");
#ifndef DISABLE_THREADING
mCoreConfigGetIntValue(config, "threadedVideo", &gbacore->threadedVideo);
mCoreConfigCopyValue(&core->config, config, "threadedVideo");
#endif
}
@ -386,7 +384,8 @@ static void _GBACoreReset(struct mCore* core) {
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 @@ static void _GBACoreEnableAudioChannel(struct mCore* core, size_t id, bool enabl
break;
case 4:
gba->audio.forceDisableChA = !enable;
break;
case 5:
gba->audio.forceDisableChB = !enable;
break;

View File

@ -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 GBAGetGameTitle(const struct GBA* gba, char* out) {
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 @@ void GBAClearBreakpoint(struct GBA* gba, uint32_t address, enum ExecutionMode mo
}
}
#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 addr
GBAClearBreakpoint((struct GBA*) debugger->cpu->master, address, mode, opcode);
return true;
}
#endif

View File

@ -365,6 +365,7 @@ static void GBASetActiveRegion(struct ARMCore* cpu, uint32_t address) {
value <<= 16; \
value |= cpu->prefetch[0]; \
} \
break; \
default: \
value |= value << 16; \
} \

View File

@ -8,6 +8,7 @@ if (SDL_VERSION EQUAL "2")
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()