diff options
Diffstat (limited to 'src/egl.cpp')
| -rw-r--r-- | src/egl.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/egl.cpp b/src/egl.cpp index 5f04110..66b4501 100644 --- a/src/egl.cpp +++ b/src/egl.cpp @@ -42,7 +42,7 @@ createEGLContextAndWindow(egl_state_t *state, int width, int height) } state->window = XCreateSimpleWindow (state->dpy, DefaultRootWindow (state->dpy), - 0, 0, + 200, 200, width, height, 0, BlackPixel (state->dpy, DefaultRootWindow (state->dpy)), @@ -70,6 +70,11 @@ createEGLContextAndWindow(egl_state_t *state, int width, int height) return false; } + if (!config or num < 1) { + warnx ("No valid EGL configuration could be found\n"); + return false; + } + state->egl_context = eglCreateContext (state->egl_display, config, NULL, ctx_attr); if (state->egl_context == EGL_NO_CONTEXT) { warnx ("Cannot create EGL context\n"); |