src/video/SDL_video.c
changeset 10699 5b918dee0872
parent 10698 044ef09cda20
child 10700 00fe449fbefe
     1.1 --- a/src/video/SDL_video.c	Sun Dec 11 11:45:33 2016 -0800
     1.2 +++ b/src/video/SDL_video.c	Sun Dec 11 12:01:01 2016 -0800
     1.3 @@ -172,6 +172,11 @@
     1.4          return SDL_TRUE;
     1.5      }
     1.6  
     1.7 +    /* If this is the dummy driver there is no texture support */
     1.8 +    if (_this->is_dummy) {
     1.9 +        return SDL_FALSE;
    1.10 +    }
    1.11 +
    1.12      /* If the user has specified a software renderer we can't use a
    1.13         texture framebuffer, or renderer creation will go recursive.
    1.14       */
    1.15 @@ -1175,7 +1180,7 @@
    1.16      if (window->is_destroying && (window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP)
    1.17          return 0;
    1.18      
    1.19 -    if (SDL_strcmp(_this->name, "dummy") != 0) {
    1.20 +    if (!_this->is_dummy) {
    1.21          /* If we're switching between a fullscreen Space and "normal" fullscreen, we need to get back to normal first. */
    1.22          if (fullscreen && ((window->last_fullscreen_flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN_DESKTOP) && ((window->flags & FULLSCREEN_MASK) == SDL_WINDOW_FULLSCREEN)) {
    1.23              if (!Cocoa_SetWindowFullscreenSpace(window, SDL_FALSE)) {
    1.24 @@ -1369,7 +1374,7 @@
    1.25  
    1.26      /* Some platforms have OpenGL enabled by default */
    1.27  #if (SDL_VIDEO_OPENGL && __MACOSX__) || __IPHONEOS__ || __ANDROID__ || __NACL__
    1.28 -    if (SDL_strcmp(_this->name, "dummy") != 0) {
    1.29 +    if (!_this->is_dummy) {
    1.30          flags |= SDL_WINDOW_OPENGL;
    1.31      }
    1.32  #endif