equal
deleted
inserted
replaced
1210 if (SDL_GL_LoadLibrary(NULL) < 0) { |
1210 if (SDL_GL_LoadLibrary(NULL) < 0) { |
1211 return NULL; |
1211 return NULL; |
1212 } |
1212 } |
1213 } |
1213 } |
1214 window = (SDL_Window *)SDL_calloc(1, sizeof(*window)); |
1214 window = (SDL_Window *)SDL_calloc(1, sizeof(*window)); |
|
1215 if (!window) { |
|
1216 SDL_OutOfMemory(); |
|
1217 return NULL; |
|
1218 } |
1215 window->magic = &_this->window_magic; |
1219 window->magic = &_this->window_magic; |
1216 window->id = _this->next_object_id++; |
1220 window->id = _this->next_object_id++; |
1217 window->x = x; |
1221 window->x = x; |
1218 window->y = y; |
1222 window->y = y; |
1219 window->w = w; |
1223 window->w = w; |
1265 if (!_this) { |
1269 if (!_this) { |
1266 SDL_UninitializedVideo(); |
1270 SDL_UninitializedVideo(); |
1267 return NULL; |
1271 return NULL; |
1268 } |
1272 } |
1269 window = (SDL_Window *)SDL_calloc(1, sizeof(*window)); |
1273 window = (SDL_Window *)SDL_calloc(1, sizeof(*window)); |
|
1274 if (!window) { |
|
1275 SDL_OutOfMemory(); |
|
1276 return NULL; |
|
1277 } |
1270 window->magic = &_this->window_magic; |
1278 window->magic = &_this->window_magic; |
1271 window->id = _this->next_object_id++; |
1279 window->id = _this->next_object_id++; |
1272 window->flags = SDL_WINDOW_FOREIGN; |
1280 window->flags = SDL_WINDOW_FOREIGN; |
1273 window->brightness = 1.0f; |
1281 window->brightness = 1.0f; |
1274 window->next = _this->windows; |
1282 window->next = _this->windows; |