src/video/SDL_video.c
changeset 13320 881796f84081
parent 13238 007002587d5d
child 13422 fd6a12de91c7
equal deleted inserted replaced
13319:580cc3860ac3 13320:881796f84081
   660 SDL_GetDisplayDriverData(int displayIndex)
   660 SDL_GetDisplayDriverData(int displayIndex)
   661 {
   661 {
   662     CHECK_DISPLAY_INDEX(displayIndex, NULL);
   662     CHECK_DISPLAY_INDEX(displayIndex, NULL);
   663 
   663 
   664     return _this->displays[displayIndex].driverdata;
   664     return _this->displays[displayIndex].driverdata;
       
   665 }
       
   666 
       
   667 SDL_bool
       
   668 SDL_IsVideoContextExternal(void)
       
   669 {
       
   670     return SDL_GetHintBoolean(SDL_HINT_VIDEO_EXTERNAL_CONTEXT, SDL_FALSE);
   665 }
   671 }
   666 
   672 
   667 const char *
   673 const char *
   668 SDL_GetDisplayName(int displayIndex)
   674 SDL_GetDisplayName(int displayIndex)
   669 {
   675 {
  1435         return NULL;
  1441         return NULL;
  1436     }
  1442     }
  1437 
  1443 
  1438     /* Some platforms have OpenGL enabled by default */
  1444     /* Some platforms have OpenGL enabled by default */
  1439 #if (SDL_VIDEO_OPENGL && __MACOSX__) || __IPHONEOS__ || __ANDROID__ || __NACL__
  1445 #if (SDL_VIDEO_OPENGL && __MACOSX__) || __IPHONEOS__ || __ANDROID__ || __NACL__
  1440     if (!_this->is_dummy && !(flags & SDL_WINDOW_VULKAN)) {
  1446     if (!_this->is_dummy && !(flags & SDL_WINDOW_VULKAN) && !SDL_IsVideoContextExternal()) {
  1441         flags |= SDL_WINDOW_OPENGL;
  1447         flags |= SDL_WINDOW_OPENGL;
  1442     }
  1448     }
  1443 #endif
  1449 #endif
  1444     if (flags & SDL_WINDOW_OPENGL) {
  1450     if (flags & SDL_WINDOW_OPENGL) {
  1445         if (!_this->GL_CreateContext) {
  1451         if (!_this->GL_CreateContext) {