comparison src/video/SDL_renderer_gl.c @ 1928:861bc36f0ab3

Fixed crash with multiple windows
author Sam Lantinga <slouken@libsdl.org>
date Sun, 23 Jul 2006 00:19:12 +0000
parents aeb8263d377a
children 420716272158
comparison
equal deleted inserted replaced
1927:aeb8263d377a 1928:861bc36f0ab3
197 { 197 {
198 SDL_Renderer *renderer; 198 SDL_Renderer *renderer;
199 GL_RenderData *data; 199 GL_RenderData *data;
200 200
201 if (!(window->flags & SDL_WINDOW_OPENGL)) { 201 if (!(window->flags & SDL_WINDOW_OPENGL)) {
202 window->flags |= SDL_WINDOW_OPENGL; 202 if (SDL_RecreateWindow(window, window->flags | SDL_WINDOW_OPENGL) < 0) {
203 if (SDL_RecreateWindow(window) < 0) {
204 return NULL; 203 return NULL;
205 } 204 }
206 } 205 }
207 206
208 renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer)); 207 renderer = (SDL_Renderer *) SDL_calloc(1, sizeof(*renderer));