From c8eb85ec2eeea88d2f9ff019f25cf664bfbc3b65 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Thu, 14 Mar 2019 20:03:41 +0100 Subject: [PATCH] Implement gl_core_wrap_type_to_enum --- gfx/drivers/gl_core.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/gfx/drivers/gl_core.c b/gfx/drivers/gl_core.c index 2a7e3d8a63..cdf4c3fb13 100644 --- a/gfx/drivers/gl_core.c +++ b/gfx/drivers/gl_core.c @@ -1998,6 +1998,25 @@ static bool gl_core_menu_widgets_enabled(void *data) } #endif +static unsigned gl_core_wrap_type_to_enum(enum gfx_wrap_type type) +{ + switch (type) + { + case RARCH_WRAP_BORDER: + return GL_CLAMP_TO_BORDER; + case RARCH_WRAP_EDGE: + return GL_CLAMP_TO_EDGE; + case RARCH_WRAP_REPEAT: + return GL_REPEAT; + case RARCH_WRAP_MIRRORED_REPEAT: + return GL_MIRRORED_REPEAT; + default: + break; + } + + return 0; +} + video_driver_t video_gl_core = { gl_core_init, gl_core_frame, @@ -2028,7 +2047,7 @@ video_driver_t video_gl_core = { gl_core_get_overlay_interface, #endif gl_core_get_poke_interface, - /*gl_core_wrap_type_to_enum,*/NULL, + gl_core_wrap_type_to_enum, #if defined(HAVE_MENU) && defined(HAVE_MENU_WIDGETS) gl_core_menu_widgets_enabled #endif