From 76732249b670cc819a184cf99909a642245354e0 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Mon, 5 Sep 2016 07:30:44 +0200 Subject: [PATCH] Cleanups --- gfx/drivers/gl_capabilities.c | 32 ++++++++++++++++++++++++++++++-- gfx/drivers/gl_capabilities.h | 30 +----------------------------- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/gfx/drivers/gl_capabilities.c b/gfx/drivers/gl_capabilities.c index 350648d2ea..69c63506a2 100644 --- a/gfx/drivers/gl_capabilities.c +++ b/gfx/drivers/gl_capabilities.c @@ -20,7 +20,6 @@ #include #include -#include #include #include "gl_capabilities.h" @@ -57,7 +56,7 @@ void gl_query_core_context_unset(void) gl_core_context = false; } -static INLINE bool gl_query_extension(const char *ext) +static bool gl_query_extension(const char *ext) { bool ret = false; @@ -89,6 +88,35 @@ static INLINE bool gl_query_extension(const char *ext) return ret; } +bool gl_check_error(char *error_string) +{ + int error = glGetError(); + switch (error) + { + case GL_INVALID_ENUM: + error_string = strdup("GL: Invalid enum."); + break; + case GL_INVALID_VALUE: + error_string = strdup("GL: Invalid value."); + break; + case GL_INVALID_OPERATION: + error_string = strdup("GL: Invalid operation."); + break; + case GL_OUT_OF_MEMORY: + error_string = strdup("GL: Out of memory."); + break; + case GL_NO_ERROR: + return true; + default: + error_string = strdup("Non specified GL error."); + break; + } + + (void)error_string; + + return false; +} + bool gl_check_capability(enum gl_capability_enum enum_idx) { unsigned major = 0; diff --git a/gfx/drivers/gl_capabilities.h b/gfx/drivers/gl_capabilities.h index 0c8f8e1a43..41ea5b57a7 100644 --- a/gfx/drivers/gl_capabilities.h +++ b/gfx/drivers/gl_capabilities.h @@ -20,7 +20,6 @@ #include #include -#include #include @@ -186,34 +185,7 @@ enum gl_capability_enum RETRO_BEGIN_DECLS -static INLINE bool gl_check_error(char *error_string) -{ - int error = glGetError(); - switch (error) - { - case GL_INVALID_ENUM: - error_string = strdup("GL: Invalid enum."); - break; - case GL_INVALID_VALUE: - error_string = strdup("GL: Invalid value."); - break; - case GL_INVALID_OPERATION: - error_string = strdup("GL: Invalid operation."); - break; - case GL_OUT_OF_MEMORY: - error_string = strdup("GL: Out of memory."); - break; - case GL_NO_ERROR: - return true; - default: - error_string = strdup("Non specified GL error."); - break; - } - - (void)error_string; - - return false; -} +bool gl_check_error(char *error_string); bool gl_query_core_context_in_use(void);