aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornyorain <nyorain@gmail.com>2017-06-20 18:26:29 +0200
committernyorain <nyorain@gmail.com>2017-06-20 18:26:29 +0200
commit62b1421635581fbffc50eac680bb5a5d7a0b8535 (patch)
tree168509e9c33cbe3160a4bb519b8c9b3cc6935a4e
parente22626ef6ae4769f37972ccd161e9d029d60f497 (diff)
Make egl_error function part of the egl interface
The function may be useful for backends using egl.
-rw-r--r--backend/egl.c2
-rw-r--r--include/backend/egl.h1
2 files changed, 2 insertions, 1 deletions
diff --git a/backend/egl.c b/backend/egl.c
index 3462113c..cfee59ce 100644
--- a/backend/egl.c
+++ b/backend/egl.c
@@ -6,7 +6,7 @@
#include "backend/egl.h"
#include "common/log.h"
-static const char *egl_error(void) {
+const char *egl_error(void) {
switch (eglGetError()) {
case EGL_SUCCESS:
return "Success";
diff --git a/include/backend/egl.h b/include/backend/egl.h
index 8cef36b7..0422a52b 100644
--- a/include/backend/egl.h
+++ b/include/backend/egl.h
@@ -10,6 +10,7 @@ struct wlr_egl {
EGLContext context;
};
+const char *egl_error(void);
bool wlr_egl_init(struct wlr_egl *egl, EGLenum platform, void *display);
void wlr_egl_free(struct wlr_egl *egl);
EGLSurface wlr_egl_create_surface(struct wlr_egl *egl, void *window);