src/SDL_log.c
changeset 6717 2acd95060548
parent 6616 4f272256d172
child 6885 700f1b25f77f
child 8377 3a7e8110201e
     1.1 --- a/src/SDL_log.c	Thu Nov 29 15:24:56 2012 -0500
     1.2 +++ b/src/SDL_log.c	Fri Nov 30 23:25:34 2012 -0800
     1.3 @@ -37,6 +37,7 @@
     1.4  #define DEFAULT_PRIORITY                SDL_LOG_PRIORITY_CRITICAL
     1.5  #define DEFAULT_ASSERT_PRIORITY         SDL_LOG_PRIORITY_WARN
     1.6  #define DEFAULT_APPLICATION_PRIORITY    SDL_LOG_PRIORITY_INFO
     1.7 +#define DEFAULT_TEST_PRIORITY           SDL_LOG_PRIORITY_VERBOSE
     1.8  
     1.9  typedef struct SDL_LogLevel
    1.10  {
    1.11 @@ -54,6 +55,7 @@
    1.12  static SDL_LogPriority SDL_default_priority = DEFAULT_PRIORITY;
    1.13  static SDL_LogPriority SDL_assert_priority = DEFAULT_ASSERT_PRIORITY;
    1.14  static SDL_LogPriority SDL_application_priority = DEFAULT_APPLICATION_PRIORITY;
    1.15 +static SDL_LogPriority SDL_test_priority = DEFAULT_TEST_PRIORITY;
    1.16  static SDL_LogOutputFunction SDL_log_function = SDL_LogOutput;
    1.17  static void *SDL_log_userdata = NULL;
    1.18  
    1.19 @@ -135,7 +137,9 @@
    1.20          }
    1.21      }
    1.22  
    1.23 -    if (category == SDL_LOG_CATEGORY_APPLICATION) {
    1.24 +    if (category == SDL_LOG_CATEGORY_TEST) {
    1.25 +        return SDL_test_priority;    
    1.26 +    } else if (category == SDL_LOG_CATEGORY_APPLICATION) {
    1.27          return SDL_application_priority;
    1.28      } else if (category == SDL_LOG_CATEGORY_ASSERT) {
    1.29          return SDL_assert_priority;
    1.30 @@ -158,6 +162,7 @@
    1.31      SDL_default_priority = DEFAULT_PRIORITY;
    1.32      SDL_assert_priority = DEFAULT_ASSERT_PRIORITY;
    1.33      SDL_application_priority = DEFAULT_APPLICATION_PRIORITY;
    1.34 +    SDL_test_priority = DEFAULT_TEST_PRIORITY;
    1.35  }
    1.36  
    1.37  void