Merge branch 'master' into port/psp2

This commit is contained in:
Jeffrey Pfau 2015-07-05 13:05:50 -07:00
commit a6fe304ad5
6 changed files with 22 additions and 14 deletions

View File

@ -96,6 +96,7 @@ Misc:
- 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:

View File

@ -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 @@ if(HAVE_NEWLOCALE AND HAVE_FREELOCALE AND HAVE_USELOCALE)
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)

View File

@ -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;

View File

@ -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; \

View File

@ -99,7 +99,7 @@ static void _pauseThread(struct GBAThread* threadContext, bool onThread) {
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 @@ static THREAD_ENTRY _GBAThreadRun(void* context) {
gba.idleOptimization = threadContext->idleOptimization;
#ifdef USE_PTHREADS
pthread_setspecific(_contextKey, threadContext);
#else
#elif _WIN32
TlsSetValue(_contextKey, threadContext);
#endif
@ -410,7 +410,7 @@ bool GBAThreadStart(struct GBAThread* threadContext) {
threadContext->interruptDepth = 0;
#ifndef _WIN32
#ifdef USE_PTHREADS
sigset_t signals;
sigemptyset(&signals);
sigaddset(&signals, SIGINT);
@ -722,6 +722,10 @@ struct GBAThread* GBAThreadGetContext(void) {
InitOnceExecuteOnce(&_contextOnce, _createTLS, NULL, 0);
return TlsGetValue(_contextKey);
}
#else
struct GBAThread* GBAThreadGetContext(void) {
return 0;
}
#endif
#ifdef USE_PNG

View File

@ -15,11 +15,14 @@ int ftostr_l(char* restrict str, size_t size, float f, locale_t 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 @@ float strtof_l(const char* restrict str, char** restrict end, locale_t 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