From 902997c5797076d4d8ab04dd73bfede7b335e2dc Mon Sep 17 00:00:00 2001 From: twinaphex Date: Wed, 9 Dec 2015 09:05:55 +0100 Subject: [PATCH] Remove gfx_ctx_data_get_ptr --- gfx/drivers_context/wayland_ctx.c | 8 +++----- gfx/video_context_driver.c | 5 ----- gfx/video_context_driver.h | 2 -- 3 files changed, 3 insertions(+), 12 deletions(-) diff --git a/gfx/drivers_context/wayland_ctx.c b/gfx/drivers_context/wayland_ctx.c index f6628326bf..bdfd000995 100644 --- a/gfx/drivers_context/wayland_ctx.c +++ b/gfx/drivers_context/wayland_ctx.c @@ -156,11 +156,9 @@ static void gfx_ctx_wl_destroy_resources(gfx_ctx_wayland_data_t *wl) wl->height = 0; } -static void flush_wayland_fd(void) +static void flush_wayland_fd(gfx_ctx_wayland_data_t *wl) { struct pollfd fd = {0}; - gfx_ctx_wayland_data_t *wl = (gfx_ctx_wayland_data_t*) - gfx_ctx_data_get_ptr(); wl_display_dispatch_pending(wl->dpy); wl_display_flush(wl->dpy); @@ -191,7 +189,7 @@ static void gfx_ctx_wl_check_window(void *data, bool *quit, (void)frame_count; - flush_wayland_fd(); + flush_wayland_fd(data); new_width = *width; new_height = *height; @@ -470,7 +468,7 @@ static bool gfx_ctx_wl_set_video_mode(void *data, if (fullscreen) wl_shell_surface_set_fullscreen(wl->shell_surf, WL_SHELL_SURFACE_FULLSCREEN_METHOD_DEFAULT, 0, NULL); - flush_wayland_fd(); + flush_wayland_fd(wl); return true; error: diff --git a/gfx/video_context_driver.c b/gfx/video_context_driver.c index 018866a140..5da3265f08 100644 --- a/gfx/video_context_driver.c +++ b/gfx/video_context_driver.c @@ -81,11 +81,6 @@ static const gfx_ctx_driver_t *gfx_ctx_drivers[] = { static const gfx_ctx_driver_t *current_video_context; static void *video_context_data; -void *gfx_ctx_data_get_ptr(void) -{ - return video_context_data; -} - void gfx_ctx_set(const gfx_ctx_driver_t *ctx_driver) { if (!ctx_driver) diff --git a/gfx/video_context_driver.h b/gfx/video_context_driver.h index 87450cf641..94dad46a0a 100644 --- a/gfx/video_context_driver.h +++ b/gfx/video_context_driver.h @@ -250,8 +250,6 @@ void gfx_ctx_input_driver( retro_proc_address_t gfx_ctx_get_proc_address(const char *sym); -void *gfx_ctx_data_get_ptr(void); - void gfx_ctx_set(const gfx_ctx_driver_t *ctx_driver); void gfx_ctx_destroy(const gfx_ctx_driver_t *ctx_driver);