src/video/SDL_video.c
changeset 1963 2590b68531ef
parent 1956 ba0d62354872
child 1965 a788656ca29a
equal deleted inserted replaced
1962:c92e5f3e68d9 1963:2590b68531ef
   353 {
   353 {
   354     if (!_this) {
   354     if (!_this) {
   355         SDL_UninitializedVideo();
   355         SDL_UninitializedVideo();
   356         return (-1);
   356         return (-1);
   357     }
   357     }
   358     if (index >= 0) {
   358     if (index < 0 || index >= _this->num_displays) {
   359         if (index >= _this->num_displays) {
   359         SDL_SetError("index must be in the range 0 - %d",
   360             SDL_SetError("index must be in the range 0 - %d",
   360                      _this->num_displays - 1);
   361                          _this->num_displays - 1);
   361         return -1;
   362             return -1;
   362     }
   363         }
   363     _this->current_display = index;
   364         _this->current_display = index;
   364     return 0;
       
   365 }
       
   366 
       
   367 int
       
   368 SDL_GetCurrentVideoDisplay(void)
       
   369 {
       
   370     if (!_this) {
       
   371         SDL_UninitializedVideo();
       
   372         return (-1);
   365     }
   373     }
   366     return _this->current_display;
   374     return _this->current_display;
   367 }
   375 }
   368 
   376 
   369 SDL_bool
   377 SDL_bool