diff --git a/gfx/drivers_context/androidegl_ctx.c b/gfx/drivers_context/androidegl_ctx.c index e8aa4ddc84..49aff8bbf7 100644 --- a/gfx/drivers_context/androidegl_ctx.c +++ b/gfx/drivers_context/androidegl_ctx.c @@ -31,53 +31,26 @@ /* forward declaration */ int system_property_get(const char *cmd, const char *args, char *value); -typedef struct gfx_ctx_android_data -{ - void *empty; -} gfx_ctx_android_data_t; - static bool g_es3; static void android_gfx_ctx_set_swap_interval(void *data, unsigned interval) { - driver_t *driver = driver_get_ptr(); - gfx_ctx_android_data_t *android = NULL; - - android = (gfx_ctx_android_data_t*)driver->video_context_data; - - (void)data; - if (!android) - return; - eglSwapInterval(g_egl_dpy, interval); } static void android_gfx_ctx_destroy(void *data) { - driver_t *driver = driver_get_ptr(); - egl_destroy(); - - if (driver->video_context_data) - free(driver->video_context_data); - driver->video_context_data = NULL; } static void android_gfx_ctx_get_video_size(void *data, unsigned *width, unsigned *height) { EGLint gl_width, gl_height; - driver_t *driver = driver_get_ptr(); - gfx_ctx_android_data_t *android = NULL; - android = (gfx_ctx_android_data_t*) - driver->video_context_data; - *width = 0; *height = 0; - if (!android) - return; if (!g_egl_dpy) return; @@ -107,19 +80,11 @@ static bool android_gfx_ctx_init(void *data) EGL_ALPHA_SIZE, 8, EGL_NONE }; - driver_t *driver = driver_get_ptr(); - gfx_ctx_android_data_t *android = NULL; struct android_app *android_app = (struct android_app*)g_android; if (!android_app) return false; - android = (gfx_ctx_android_data_t*) - calloc(1, sizeof(gfx_ctx_android_data_t)); - - if (!android) - return false; - RARCH_LOG("Android EGL: GLES version = %d.\n", g_es3 ? 3 : 2); g_egl_dpy = eglGetDisplay(EGL_DEFAULT_DISPLAY); @@ -179,16 +144,11 @@ static bool android_gfx_ctx_init(void *data) g_egl_surf, g_egl_ctx)) goto error; - driver->video_context_data = android; - return true; error: egl_destroy(); - if (android) - free(android); - return false; } diff --git a/gfx/drivers_context/bbqnx_ctx.c b/gfx/drivers_context/bbqnx_ctx.c index 5d45db28f3..b72f46d4bd 100644 --- a/gfx/drivers_context/bbqnx_ctx.c +++ b/gfx/drivers_context/bbqnx_ctx.c @@ -45,7 +45,6 @@ static enum gfx_ctx_api g_api; static void gfx_ctx_qnx_set_swap_interval(void *data, unsigned interval) { - (void)data; eglSwapInterval(g_egl_dpy, interval); }