src/SDL_error.c
changeset 5221 2ee8112bfc6b
parent 4992 b12d76ef05e2
child 5262 b530ef003506
     1.1 --- a/src/SDL_error.c	Mon Feb 07 10:40:21 2011 -0800
     1.2 +++ b/src/SDL_error.c	Mon Feb 07 16:45:40 2011 -0800
     1.3 @@ -23,14 +23,10 @@
     1.4  
     1.5  /* Simple error handling in SDL */
     1.6  
     1.7 -#ifdef __ANDROID__
     1.8 -#include <android/log.h>
     1.9 -#endif
    1.10 -
    1.11 +#include "SDL_log.h"
    1.12  #include "SDL_error.h"
    1.13  #include "SDL_error_c.h"
    1.14  
    1.15 -/*#define DEBUG_ERROR*/
    1.16  
    1.17  /* Routine to get the thread-specific error variable */
    1.18  #if SDL_THREADS_DISABLED
    1.19 @@ -113,12 +109,7 @@
    1.20      va_end(ap);
    1.21  
    1.22      /* If we are in debug mode, print out an error message */
    1.23 -#ifdef DEBUG_ERROR
    1.24 -    fprintf(stderr, "SDL_SetError: %s\n", SDL_GetError());
    1.25 -#ifdef __ANDROID__
    1.26 -    __android_log_print(ANDROID_LOG_INFO, "SDL", "ERROR: %s", SDL_GetError());
    1.27 -#endif
    1.28 -#endif /* DEBUG_ERROR */
    1.29 +    SDL_LogError(SDL_LOG_CATEGORY_ERROR, "%s", SDL_GetError());
    1.30  }
    1.31  
    1.32  /* This function has a bit more overhead than most error functions