Mercurial > sdl-ios-xcode
diff src/SDL_error.c @ 5226:2ee8112bfc6b
Added a simple log message API
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 07 Feb 2011 16:45:40 -0800 |
parents | b12d76ef05e2 |
children | b530ef003506 |
line wrap: on
line diff
--- a/src/SDL_error.c Mon Feb 07 10:40:21 2011 -0800 +++ b/src/SDL_error.c Mon Feb 07 16:45:40 2011 -0800 @@ -23,14 +23,10 @@ /* Simple error handling in SDL */ -#ifdef __ANDROID__ -#include <android/log.h> -#endif - +#include "SDL_log.h" #include "SDL_error.h" #include "SDL_error_c.h" -/*#define DEBUG_ERROR*/ /* Routine to get the thread-specific error variable */ #if SDL_THREADS_DISABLED @@ -113,12 +109,7 @@ va_end(ap); /* If we are in debug mode, print out an error message */ -#ifdef DEBUG_ERROR - fprintf(stderr, "SDL_SetError: %s\n", SDL_GetError()); -#ifdef __ANDROID__ - __android_log_print(ANDROID_LOG_INFO, "SDL", "ERROR: %s", SDL_GetError()); -#endif -#endif /* DEBUG_ERROR */ + SDL_LogError(SDL_LOG_CATEGORY_ERROR, "%s", SDL_GetError()); } /* This function has a bit more overhead than most error functions