src/video/SDL_video.c
changeset 9163 d05b5b2775ae
parent 9135 6cd8e6b54f4d
child 9164 494876610c49
equal deleted inserted replaced
9162:69856cdc9da6 9163:d05b5b2775ae
  1337 
  1337 
  1338     if (!_this) {
  1338     if (!_this) {
  1339         SDL_UninitializedVideo();
  1339         SDL_UninitializedVideo();
  1340         return NULL;
  1340         return NULL;
  1341     }
  1341     }
       
  1342     if (!_this->CreateWindowFrom) {
       
  1343         SDL_Unsupported();
       
  1344         return NULL;
       
  1345     }
  1342     window = (SDL_Window *)SDL_calloc(1, sizeof(*window));
  1346     window = (SDL_Window *)SDL_calloc(1, sizeof(*window));
  1343     if (!window) {
  1347     if (!window) {
  1344         SDL_OutOfMemory();
  1348         SDL_OutOfMemory();
  1345         return NULL;
  1349         return NULL;
  1346     }
  1350     }
  1354     if (_this->windows) {
  1358     if (_this->windows) {
  1355         _this->windows->prev = window;
  1359         _this->windows->prev = window;
  1356     }
  1360     }
  1357     _this->windows = window;
  1361     _this->windows = window;
  1358 
  1362 
  1359     if (!_this->CreateWindowFrom ||
  1363     if (_this->CreateWindowFrom(_this, window, data) < 0) {
  1360         _this->CreateWindowFrom(_this, window, data) < 0) {
       
  1361         SDL_DestroyWindow(window);
  1364         SDL_DestroyWindow(window);
  1362         return NULL;
  1365         return NULL;
  1363     }
  1366     }
  1364     return window;
  1367     return window;
  1365 }
  1368 }
  3179 SDL_GetWindowWMInfo(SDL_Window * window, struct SDL_SysWMinfo *info)
  3182 SDL_GetWindowWMInfo(SDL_Window * window, struct SDL_SysWMinfo *info)
  3180 {
  3183 {
  3181     CHECK_WINDOW_MAGIC(window, SDL_FALSE);
  3184     CHECK_WINDOW_MAGIC(window, SDL_FALSE);
  3182 
  3185 
  3183     if (!info) {
  3186     if (!info) {
       
  3187         SDL_InvalidParamError("info");
  3184         return SDL_FALSE;
  3188         return SDL_FALSE;
  3185     }
  3189     }
  3186     info->subsystem = SDL_SYSWM_UNKNOWN;
  3190     info->subsystem = SDL_SYSWM_UNKNOWN;
  3187 
  3191 
  3188     if (!_this->GetWindowWMInfo) {
  3192     if (!_this->GetWindowWMInfo) {
       
  3193         SDL_Unsupported();
  3189         return SDL_FALSE;
  3194         return SDL_FALSE;
  3190     }
  3195     }
  3191     return (_this->GetWindowWMInfo(_this, window, info));
  3196     return (_this->GetWindowWMInfo(_this, window, info));
  3192 }
  3197 }
  3193 
  3198