1.1 --- a/src/video/SDL_video.c Sun Jul 30 08:09:20 2006 +0000
1.2 +++ b/src/video/SDL_video.c Wed Aug 02 03:20:52 2006 +0000
1.3 @@ -355,13 +355,21 @@
1.4 SDL_UninitializedVideo();
1.5 return (-1);
1.6 }
1.7 - if (index >= 0) {
1.8 - if (index >= _this->num_displays) {
1.9 - SDL_SetError("index must be in the range 0 - %d",
1.10 - _this->num_displays - 1);
1.11 - return -1;
1.12 - }
1.13 - _this->current_display = index;
1.14 + if (index < 0 || index >= _this->num_displays) {
1.15 + SDL_SetError("index must be in the range 0 - %d",
1.16 + _this->num_displays - 1);
1.17 + return -1;
1.18 + }
1.19 + _this->current_display = index;
1.20 + return 0;
1.21 +}
1.22 +
1.23 +int
1.24 +SDL_GetCurrentVideoDisplay(void)
1.25 +{
1.26 + if (!_this) {
1.27 + SDL_UninitializedVideo();
1.28 + return (-1);
1.29 }
1.30 return _this->current_display;
1.31 }