src/video/SDL_video.c
branchiOS-improvements
changeset 9537 ff30c198864e
parent 9536 3c87b8f9dc58
parent 9474 067b78126485
child 9546 d997877cdad7
     1.1 --- a/src/video/SDL_video.c	Mon Apr 06 15:26:37 2015 -0300
     1.2 +++ b/src/video/SDL_video.c	Wed Apr 08 15:35:07 2015 -0300
     1.3 @@ -1265,6 +1265,12 @@
     1.4          h = 1;
     1.5      }
     1.6  
     1.7 +    /* Some platforms blow up if the windows are too large. Raise it later? */
     1.8 +    if ((w > 16384) || (h > 16384)) {
     1.9 +        SDL_SetError("Window is too large.");
    1.10 +        return NULL;
    1.11 +    }
    1.12 +
    1.13      /* Some platforms have OpenGL enabled by default */
    1.14  #if (SDL_VIDEO_OPENGL && __MACOSX__) || __IPHONEOS__ || __ANDROID__ || __NACL__
    1.15      flags |= SDL_WINDOW_OPENGL;
    1.16 @@ -1501,11 +1507,8 @@
    1.17          return;
    1.18      }
    1.19      SDL_free(window->title);
    1.20 -    if (title && *title) {
    1.21 -        window->title = SDL_strdup(title);
    1.22 -    } else {
    1.23 -        window->title = NULL;
    1.24 -    }
    1.25 +
    1.26 +    window->title = SDL_strdup(title ? title : "");
    1.27  
    1.28      if (_this->SetWindowTitle) {
    1.29          _this->SetWindowTitle(_this, window);