Fixup logging interface/Set min OS version to 10.6

This commit is contained in:
twinaphex 2014-03-05 03:26:01 +01:00
parent 7dbeddece1
commit c60ce5c720
2 changed files with 11 additions and 5 deletions

View File

@ -43,7 +43,7 @@ ifeq ($(platform), unix)
PLATFORM_DEFINES := -DHAVE_ZLIB
else ifeq ($(platform), osx)
TARGET := $(TARGET_NAME)_libretro.dylib
fpic := -fPIC
fpic := -fPIC -mmacosx-version-min=10.6
SHARED := -dynamiclib -lz
ENDIANNESS_DEFINES := -DLSB_FIRST
PLATFORM_DEFINES := -DHAVE_ZLIB

View File

@ -71,10 +71,15 @@ static retro_audio_sample_batch_t audio_cb;
************************************/
#define CHUNKSIZE (0x10000)
void error(char * msg, ...)
void error(char * fmt, ...)
{
char buffer[256];
va_list ap;
va_start(ap, fmt);
vsprintf(buffer, fmt, ap);
if (log_cb)
log_cb(RETRO_LOG_ERROR, msg);
log_cb(RETRO_LOG_ERROR, "%s\n", buffer);
va_end(ap);
}
int load_archive(char *filename, unsigned char *buffer, int maxsize, char *extension)
@ -964,9 +969,10 @@ void retro_init(void)
level = 1;
environ_cb(RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL, &level);
environ_cb(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &log);
if (log.log)
if (environ_cb(RETRO_ENVIRONMENT_GET_LOG_INTERFACE, &log))
log_cb = log.log;
else
log_cb = NULL;
#ifdef FRONTEND_SUPPORTS_RGB565
rgb565 = RETRO_PIXEL_FORMAT_RGB565;