src/SDL_error.c
changeset 4979 be4ba07d9867
parent 4867 ba7492f9e2b8
child 4992 b12d76ef05e2
equal deleted inserted replaced
4978:4a7f284a82b2 4979:be4ba07d9867
    20     slouken@libsdl.org
    20     slouken@libsdl.org
    21 */
    21 */
    22 #include "SDL_config.h"
    22 #include "SDL_config.h"
    23 
    23 
    24 /* Simple error handling in SDL */
    24 /* Simple error handling in SDL */
       
    25 
       
    26 #ifdef __ANDROID__
       
    27 #include <android/log.h>
       
    28 #endif
    25 
    29 
    26 #include "SDL_error.h"
    30 #include "SDL_error.h"
    27 #include "SDL_error_c.h"
    31 #include "SDL_error_c.h"
    28 
    32 
    29 /*#define DEBUG_ERROR*/
    33 /*#define DEBUG_ERROR*/
   109     va_end(ap);
   113     va_end(ap);
   110 
   114 
   111     /* If we are in debug mode, print out an error message */
   115     /* If we are in debug mode, print out an error message */
   112 #ifdef DEBUG_ERROR
   116 #ifdef DEBUG_ERROR
   113     fprintf(stderr, "SDL_SetError: %s\n", SDL_GetError());
   117     fprintf(stderr, "SDL_SetError: %s\n", SDL_GetError());
       
   118 #ifdef __ANDROID__
       
   119     __android_log_print(ANDROID_LOG_INFO, "SDL", "ERROR: %s", SDL_GetError());
   114 #endif
   120 #endif
       
   121 #endif /* DEBUG_ERROR */
   115 }
   122 }
   116 
   123 
   117 /* This function has a bit more overhead than most error functions
   124 /* This function has a bit more overhead than most error functions
   118    so that it supports internationalization and thread-safe errors.
   125    so that it supports internationalization and thread-safe errors.
   119 */
   126 */