src/video/SDL_video.c
changeset 7954 712d8544f8a1
parent 7953 255ca6c77e58
child 7968 8c0afe77a1b2
equal deleted inserted replaced
7953:255ca6c77e58 7954:712d8544f8a1
  2136 
  2136 
  2137 static SDL_bool
  2137 static SDL_bool
  2138 ShouldMinimizeOnFocusLoss(SDL_Window * window)
  2138 ShouldMinimizeOnFocusLoss(SDL_Window * window)
  2139 {
  2139 {
  2140     SDL_bool default_minimize;
  2140     SDL_bool default_minimize;
       
  2141     const char *hint;
  2141 
  2142 
  2142     if (!(window->flags & SDL_WINDOW_FULLSCREEN)) {
  2143     if (!(window->flags & SDL_WINDOW_FULLSCREEN)) {
  2143         return SDL_FALSE;
  2144         return SDL_FALSE;
  2144     }
  2145     }
  2145 
  2146 
  2148         default_minimize = SDL_FALSE;
  2149         default_minimize = SDL_FALSE;
  2149     } else {
  2150     } else {
  2150         default_minimize = SDL_TRUE;
  2151         default_minimize = SDL_TRUE;
  2151     }
  2152     }
  2152 
  2153 
  2153     const char *hint = SDL_GetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS);
  2154     hint = SDL_GetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS);
  2154     if (hint) {
  2155     if (hint) {
  2155         if (*hint == '0') {
  2156         if (*hint == '0') {
  2156             return SDL_FALSE;
  2157             return SDL_FALSE;
  2157         } else {
  2158         } else {
  2158             return SDL_TRUE;
  2159             return SDL_TRUE;