Merge branch 'master' into port/psp2
Jeffrey Pfau jeffrey@endrift.com
Sun, 05 Jul 2015 13:05:50 -0700
6 files changed,
22 insertions(+),
14 deletions(-)
M
CHANGES
→
CHANGES
@@ -96,6 +96,7 @@ - SDL: Clean up GL context
- GBA Audio: Implement audio reset for channels A/B - GBA Hardware: Backport generic RTC source into core - All: Proper handling of Unicode file paths + - GBA Video: Slightly optimize mode 0 mosaic rendering 0.2.1: (2015-05-13) Bugfixes:
M
CMakeLists.txt
→
CMakeLists.txt
@@ -228,6 +228,7 @@ endif()
check_function_exists(newlocale HAVE_NEWLOCALE) check_function_exists(freelocale HAVE_FREELOCALE) check_function_exists(uselocale HAVE_USELOCALE) +check_function_exists(setlocale HAVE_SETLOCALE) if(HAVE_STRDUP) add_definitions(-DHAVE_STRDUP)@@ -247,6 +248,9 @@ add_definitions(-DHAVE_SNPRINTF_L)
endif() endif() +if(HAVE_SETLOCALE) + add_definitions(-DHAVE_SETLOCALE) +endif() # Features set(DEBUGGER_SRC ${CMAKE_SOURCE_DIR}/src/debugger/debugger.c ${CMAKE_SOURCE_DIR}/src/debugger/memory-debugger.c)
M
res/mgba-qt.desktop
→
res/mgba-qt.desktop
@@ -6,6 +6,7 @@ Terminal=false
Type=Application Name=mGBA GenericName=Game Boy Advance Emulator +Comment=Nintendo Game Boy Advance Emulator Categories=Game;Emulator; MimeType=application/x-gameboy-advance-rom;application/x-agb-rom;application/x-gba-rom; - +Keywords=emulator;Nintendo;advance;gba;Game Boy Advance;
M
src/gba/renderers/software-mode0.c
→
src/gba/renderers/software-mode0.c
@@ -98,11 +98,7 @@ } \
tileData &= 0xF; \ tileData |= tileData << 4; \ tileData |= tileData << 8; \ - tileData |= tileData << 12; \ tileData |= tileData << 16; \ - tileData |= tileData << 20; \ - tileData |= tileData << 24; \ - tileData |= tileData << 28; \ carryData = tileData; \ } \ } \@@ -126,11 +122,7 @@ } \
tileData &= 0xF; \ tileData |= tileData << 4; \ tileData |= tileData << 8; \ - tileData |= tileData << 12; \ tileData |= tileData << 16; \ - tileData |= tileData << 20; \ - tileData |= tileData << 24; \ - tileData |= tileData << 28; \ carryData = tileData; \ } \ mosaicWait = mosaicH; \
M
src/gba/supervisor/thread.c
→
src/gba/supervisor/thread.c
@@ -99,7 +99,7 @@
static THREAD_ENTRY _GBAThreadRun(void* context) { #ifdef USE_PTHREADS pthread_once(&_contextOnce, _createTLS); -#else +#elif _WIN32 InitOnceExecuteOnce(&_contextOnce, _createTLS, NULL, 0); #endif@@ -132,7 +132,7 @@ gba.stream = threadContext->stream;
gba.idleOptimization = threadContext->idleOptimization; #ifdef USE_PTHREADS pthread_setspecific(_contextKey, threadContext); -#else +#elif _WIN32 TlsSetValue(_contextKey, threadContext); #endif@@ -410,7 +410,7 @@ ConditionInit(&threadContext->sync.audioRequiredCond);
threadContext->interruptDepth = 0; -#ifndef _WIN32 +#ifdef USE_PTHREADS sigset_t signals; sigemptyset(&signals); sigaddset(&signals, SIGINT);@@ -721,6 +721,10 @@ #elif _WIN32
struct GBAThread* GBAThreadGetContext(void) { InitOnceExecuteOnce(&_contextOnce, _createTLS, NULL, 0); return TlsGetValue(_contextKey); +} +#else +struct GBAThread* GBAThreadGetContext(void) { + return 0; } #endif
M
src/util/formatting.c
→
src/util/formatting.c
@@ -15,11 +15,14 @@ locale_t old = uselocale(locale);
int res = snprintf(str, size, "%*.g", FLT_DIG, f); uselocale(old); return res; -#else +#elif defined(HAVE_SETLOCALE) char* old = setlocale(LC_NUMERIC, locale); int res = snprintf(str, size, "%*.g", FLT_DIG, f); setlocale(LC_NUMERIC, old); return res; +#else + UNUSED(locale); + return snprintf(str, size, "%*.g", FLT_DIG, f); #endif }@@ -30,11 +33,14 @@ locale_t old = uselocale(locale);
float res = strtof(str, end); uselocale(old); return res; -#else +#elif defined(HAVE_SETLOCALE) char* old = setlocale(LC_NUMERIC, locale); float res = strtof(str, end); setlocale(LC_NUMERIC, old); return res; +#else + UNUSED(locale); + return strtof(str, end); #endif } #endif