src/SDL_hints.c
changeset 11513 5eafaa1085a1
parent 10737 3406a0f8b041
child 11811 5d94cb6b24d3
equal deleted inserted replaced
11512:a1d8a2ce9d01 11513:5eafaa1085a1
   120 
   120 
   121 SDL_bool
   121 SDL_bool
   122 SDL_GetHintBoolean(const char *name, SDL_bool default_value)
   122 SDL_GetHintBoolean(const char *name, SDL_bool default_value)
   123 {
   123 {
   124     const char *hint = SDL_GetHint(name);
   124     const char *hint = SDL_GetHint(name);
   125     if (!hint) {
   125     if (!hint || !*hint) {
   126         return default_value;
   126         return default_value;
   127     }
   127     }
   128     if (*hint == '0' || SDL_strcasecmp(hint, "false") == 0) {
   128     if (*hint == '0' || SDL_strcasecmp(hint, "false") == 0) {
   129         return SDL_FALSE;
   129         return SDL_FALSE;
   130     }
   130     }