From 866501703fd98eafa0f3dfa4a10dd412cba93f2c Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 23 Nov 2015 21:28:54 +0100 Subject: [PATCH] Cleanups --- gfx/drivers_context/cgl_ctx.c | 1 - gfx/drivers_context/drm_egl_ctx.c | 2 -- gfx/drivers_context/glx_ctx.c | 1 - gfx/drivers_context/ps3_ctx.c | 1 - gfx/drivers_context/sdl_gl_ctx.c | 8 +------- gfx/drivers_context/wayland_ctx.c | 2 -- gfx/drivers_context/xegl_ctx.c | 1 - 7 files changed, 1 insertion(+), 15 deletions(-) diff --git a/gfx/drivers_context/cgl_ctx.c b/gfx/drivers_context/cgl_ctx.c index a23e50a9b7..84d770d4ab 100644 --- a/gfx/drivers_context/cgl_ctx.c +++ b/gfx/drivers_context/cgl_ctx.c @@ -307,7 +307,6 @@ static CGSSurfaceID attach_gl_context_to_window(CGLContextObj glCtx, static bool gfx_ctx_cgl_init(void *data) { CGError err; - driver_t *driver = driver_get_ptr(); gfx_ctx_cgl_data_t *cgl = (gfx_ctx_cgl_data_t*)calloc(1, sizeof(gfx_ctx_cgl_data_t)); if (!cgl) diff --git a/gfx/drivers_context/drm_egl_ctx.c b/gfx/drivers_context/drm_egl_ctx.c index 66f4dfb7a8..1fd006257d 100644 --- a/gfx/drivers_context/drm_egl_ctx.c +++ b/gfx/drivers_context/drm_egl_ctx.c @@ -371,9 +371,7 @@ static bool gfx_ctx_drm_egl_init(void *data) struct string_list *gpu_descriptors = NULL; settings_t *settings = config_get_ptr(); unsigned monitor = max(settings->video.monitor_index, 1); - gfx_ctx_drm_egl_data_t *drm = (gfx_ctx_drm_egl_data_t*)calloc(1, sizeof(gfx_ctx_drm_egl_data_t)); - driver_t *driver = driver_get_ptr(); if (!drm) return false; diff --git a/gfx/drivers_context/glx_ctx.c b/gfx/drivers_context/glx_ctx.c index 339993ff7e..04ed16524a 100644 --- a/gfx/drivers_context/glx_ctx.c +++ b/gfx/drivers_context/glx_ctx.c @@ -208,7 +208,6 @@ static bool gfx_ctx_glx_init(void *data) int nelements, major, minor; GLXFBConfig *fbcs = NULL; gfx_ctx_glx_data_t *glx = (gfx_ctx_glx_data_t*)calloc(1, sizeof(gfx_ctx_glx_data_t)); - driver_t *driver = driver_get_ptr(); const struct retro_hw_render_callback *hw_render = (const struct retro_hw_render_callback*)video_driver_callback(); diff --git a/gfx/drivers_context/ps3_ctx.c b/gfx/drivers_context/ps3_ctx.c index 8ff8b0cba5..cfc43090c9 100644 --- a/gfx/drivers_context/ps3_ctx.c +++ b/gfx/drivers_context/ps3_ctx.c @@ -224,7 +224,6 @@ static bool gfx_ctx_ps3_init(void *data) PSGLdeviceParameters params; PSGLinitOptions options; #endif - driver_t *driver = driver_get_ptr(); global_t *global = global_get_ptr(); gfx_ctx_ps3_data_t *ps3 = (gfx_ctx_ps3_data_t*) calloc(1, sizeof(gfx_ctx_ps3_data_t)); diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 0d46696345..533f5b147d 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -67,12 +67,7 @@ static void sdl_ctx_destroy_resources(gfx_ctx_sdl_data_t *sdl) static bool sdl_ctx_init(void *data) { - gfx_ctx_sdl_data_t *sdl = NULL; - driver_t *driver = driver_get_ptr(); - - (void)data; - - sdl = (gfx_ctx_sdl_data_t*) + gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*) calloc(1, sizeof(gfx_ctx_sdl_data_t)); if (!sdl) @@ -236,7 +231,6 @@ error: static void sdl_ctx_get_video_size(void *data, unsigned *width, unsigned *height) { - driver_t *driver = driver_get_ptr(); settings_t *settings = config_get_ptr(); gfx_ctx_sdl_data_t *sdl = (gfx_ctx_sdl_data_t*)gfx_ctx_data_get_ptr(); diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index e756f5e02e..9ac28cb57b 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -298,8 +298,6 @@ static bool gfx_ctx_wl_init(void *data) EGLint major = 0, minor = 0; EGLint n; const EGLint *attrib_ptr; - driver_t *driver = driver_get_ptr(); - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*) calloc(1, sizeof(gfx_ctx_wayland_data_t)); diff --git a/gfx/drivers_context/xegl_ctx.c b/gfx/drivers_context/xegl_ctx.c index 0d958807dc..70252aea4e 100644 --- a/gfx/drivers_context/xegl_ctx.c +++ b/gfx/drivers_context/xegl_ctx.c @@ -258,7 +258,6 @@ static bool gfx_ctx_xegl_set_video_mode(void *data, XVisualInfo temp = {0}; XSetWindowAttributes swa = {0}; XVisualInfo *vi = NULL; - driver_t *driver = driver_get_ptr(); settings_t *settings = config_get_ptr(); int (*old_handler)(Display*, XErrorEvent*) = NULL;