summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoel Teichroeb <joel@teichroeb.net>2010-12-07 14:09:17 -0800
committerBenjamin Franzke <benjaminfranzke@googlemail.com>2012-02-28 08:29:08 +0100
commit3a08fcaadceb1ce8565d625b1ab975b0b6c350f4 (patch)
tree1871c3d83799e088e706e03b21f101df6f8ad548
parentf55606c2a76d4f26187b2e864c4838b6f8f5eb16 (diff)
If the window was not created with the opengl flag, opengl is
initialized and the flag is added.
-rw-r--r--src/video/wayland/SDL_waylandwindow.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/video/wayland/SDL_waylandwindow.c b/src/video/wayland/SDL_waylandwindow.c
index c368d35d..0913b580 100644
--- a/src/video/wayland/SDL_waylandwindow.c
+++ b/src/video/wayland/SDL_waylandwindow.c
@@ -32,6 +32,11 @@ int Wayland_CreateWindow(_THIS, SDL_Window * window)
c = _this->driverdata;
window->driverdata = data;
+
+ if (!(window->flags & SDL_WINDOW_OPENGL)) {
+ SDL_GL_LoadLibrary(NULL);
+ window->flags &= SDL_WINDOW_OPENGL;
+ }
if (window->x == SDL_WINDOWPOS_UNDEFINED) {
window->x = 0;