Mercurial > sdl-ios-xcode
comparison src/video/SDL_video.c @ 1928:861bc36f0ab3
Fixed crash with multiple windows
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Sun, 23 Jul 2006 00:19:12 +0000 |
parents | 307355678142 |
children | 9483df98e011 |
comparison
equal
deleted
inserted
replaced
1927:aeb8263d377a | 1928:861bc36f0ab3 |
---|---|
841 | 841 |
842 return window.id; | 842 return window.id; |
843 } | 843 } |
844 | 844 |
845 int | 845 int |
846 SDL_RecreateWindow(SDL_Window * window) | 846 SDL_RecreateWindow(SDL_Window * window, Uint32 flags) |
847 { | 847 { |
848 if ((window->flags & SDL_WINDOW_OPENGL) && !_this->GL_CreateContext) { | 848 if ((flags & SDL_WINDOW_OPENGL) && !_this->GL_CreateContext) { |
849 window->flags &= ~SDL_WINDOW_OPENGL; | |
850 SDL_SetError("No OpenGL support in video driver"); | 849 SDL_SetError("No OpenGL support in video driver"); |
851 return -1; | 850 return -1; |
852 } | 851 } |
853 if (_this->DestroyWindow) { | 852 if (_this->DestroyWindow) { |
854 _this->DestroyWindow(_this, window); | 853 _this->DestroyWindow(_this, window); |
855 } | 854 } |
855 window->flags = flags; | |
856 return _this->CreateWindow(_this, window); | 856 return _this->CreateWindow(_this, window); |
857 } | 857 } |
858 | 858 |
859 SDL_Window * | 859 SDL_Window * |
860 SDL_GetWindowFromID(SDL_WindowID windowID) | 860 SDL_GetWindowFromID(SDL_WindowID windowID) |