src/video/SDL_video.c
changeset 7429 ff7edbf76a73
parent 7412 50211a1fd557
child 7439 f52afd324ec7
equal deleted inserted replaced
7428:9fb919fc2dd3 7429:ff7edbf76a73
  2737     }
  2737     }
  2738 
  2738 
  2739     ctx = _this->GL_CreateContext(_this, window);
  2739     ctx = _this->GL_CreateContext(_this, window);
  2740 
  2740 
  2741     /* Creating a context is assumed to make it current in the SDL driver. */
  2741     /* Creating a context is assumed to make it current in the SDL driver. */
  2742     _this->current_glwin = window;
  2742     if (ctx) {
  2743     _this->current_glctx = ctx;
  2743         _this->current_glwin = window;
  2744     SDL_TLSSet(_this->current_glwin_tls, window, NULL);
  2744         _this->current_glctx = ctx;
  2745     SDL_TLSSet(_this->current_glctx_tls, ctx, NULL);
  2745         SDL_TLSSet(_this->current_glwin_tls, window, NULL);
  2746 
  2746         SDL_TLSSet(_this->current_glctx_tls, ctx, NULL);
       
  2747     }
  2747     return ctx;
  2748     return ctx;
  2748 }
  2749 }
  2749 
  2750 
  2750 int
  2751 int
  2751 SDL_GL_MakeCurrent(SDL_Window * window, SDL_GLContext ctx)
  2752 SDL_GL_MakeCurrent(SDL_Window * window, SDL_GLContext ctx)