diff --git a/gfx/common/egl_common.c b/gfx/common/egl_common.c index bb21a0cb11..0915317d94 100644 --- a/gfx/common/egl_common.c +++ b/gfx/common/egl_common.c @@ -224,7 +224,7 @@ bool egl_init_context(void *data, NativeDisplayType display, return true; } -bool egl_create_context(void *data, EGLint *egl_attribs) +bool egl_create_context(void *data, const EGLint *egl_attribs) { egl_ctx_data_t *egl = (egl_ctx_data_t*)data; egl->ctx = eglCreateContext(egl->dpy, egl->config, EGL_NO_CONTEXT, diff --git a/gfx/common/egl_common.h b/gfx/common/egl_common.h index ef08294414..920b1e7681 100644 --- a/gfx/common/egl_common.h +++ b/gfx/common/egl_common.h @@ -88,7 +88,7 @@ bool egl_init_context(void *data, NativeDisplayType display, EGLint *major, EGLint *minor, EGLint *n, const EGLint *attrib_ptr); -bool egl_create_context(void *data, EGLint *egl_attribs); +bool egl_create_context(void *data, const EGLint *egl_attribs); bool egl_create_surface(void *data, NativeWindowType native_window); diff --git a/gfx/drivers_context/vc_egl_ctx.c b/gfx/drivers_context/vc_egl_ctx.c index 379fd8ded2..587b98a224 100644 --- a/gfx/drivers_context/vc_egl_ctx.c +++ b/gfx/drivers_context/vc_egl_ctx.c @@ -282,11 +282,13 @@ static bool gfx_ctx_vc_set_video_mode(void *data, unsigned width, unsigned height, bool fullscreen) { + vc_ctx_data_t *vc = (vc_ctx_data_t*)data; + if (g_egl_inited) return false; egl_install_sighandlers(); - egl_set_swap_interval(data, g_interval); + egl_set_swap_interval(data, vc->egl.interval); g_egl_inited = true; @@ -537,7 +539,7 @@ static bool gfx_ctx_vc_image_buffer_write(void *data, const void *frame, unsigne vc->res, vc->res, VG_IMAGE_QUALITY_NONANTIALIASED); - eglBuffer[index] = peglCreateImageKHR( + vc->eglBuffer[index] = peglCreateImageKHR( vc->egl.dpy, vc->eglimage_ctx, EGL_VG_PARENT_IMAGE_KHR,