src/video/SDL_video.c
changeset 3701 fb905d5674cc
parent 3697 f7b03b6838cb
child 4433 9fa97c6b0014
     1.1 --- a/src/video/SDL_video.c	Wed Jan 27 05:14:22 2010 +0000
     1.2 +++ b/src/video/SDL_video.c	Mon Feb 01 01:19:37 2010 +0000
     1.3 @@ -110,7 +110,7 @@
     1.4          SDL_UninitializedVideo(); \
     1.5          return retval; \
     1.6      } \
     1.7 -	if (!window || window->magic != &_this->window_magic) { \
     1.8 +    if (!window || window->magic != &_this->window_magic) { \
     1.9          SDL_SetError("Invalid window"); \
    1.10          return retval; \
    1.11      }
    1.12 @@ -120,7 +120,7 @@
    1.13          SDL_UninitializedVideo(); \
    1.14          return retval; \
    1.15      } \
    1.16 -	if (!texture || texture->magic != &_this->texture_magic) { \
    1.17 +    if (!texture || texture->magic != &_this->texture_magic) { \
    1.18          SDL_SetError("Invalid texture"); \
    1.19          return retval; \
    1.20      }
    1.21 @@ -772,7 +772,6 @@
    1.22  SDL_UpdateFullscreenMode(SDL_Window * window, SDL_bool attempt)
    1.23  {
    1.24      SDL_VideoDisplay *display = window->display;
    1.25 -    int i;
    1.26  
    1.27      /* See if we're already processing a window */
    1.28      if (display->updating_fullscreen) {
    1.29 @@ -799,8 +798,8 @@
    1.30  
    1.31      if (FULLSCREEN_VISIBLE(window)) {
    1.32          /* Hide any other fullscreen windows */
    1.33 -        for (i = 0; i < display->num_windows; ++i) {
    1.34 -            SDL_Window *other = &display->windows[i];
    1.35 +        SDL_Window *other;
    1.36 +        for (other = display->windows; other; other = other->next) {
    1.37              if (other != window && FULLSCREEN_VISIBLE(other)) {
    1.38                  SDL_MinimizeWindow(other);
    1.39              }
    1.40 @@ -810,8 +809,7 @@
    1.41      display->updating_fullscreen = SDL_FALSE;
    1.42  
    1.43      /* See if there are any fullscreen windows */
    1.44 -    for (i = 0; i < display->num_windows; ++i) {
    1.45 -        window = &display->windows[i];
    1.46 +    for (window = display->windows; window; window = window->next) {
    1.47          if (FULLSCREEN_VISIBLE(window)) {
    1.48              SDL_DisplayMode fullscreen_mode;
    1.49              if (SDL_GetWindowDisplayMode(window, &fullscreen_mode) == 0) {