From 5f4ee2567cdbc724057426e2b360af666bac08d1 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sun, 28 Aug 2016 18:20:31 +0200 Subject: [PATCH] (sdl_gl_ctx.c) Cleanup --- gfx/drivers_context/sdl_gl_ctx.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gfx/drivers_context/sdl_gl_ctx.c b/gfx/drivers_context/sdl_gl_ctx.c index 394da5a2d1..4e6e99a57a 100644 --- a/gfx/drivers_context/sdl_gl_ctx.c +++ b/gfx/drivers_context/sdl_gl_ctx.c @@ -135,15 +135,16 @@ static bool sdl_ctx_bind_api(void *data, enum gfx_ctx_api api, unsigned major, SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, major); SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, minor); #endif + sdl_api = api; g_major = major; g_minor = minor; -#ifdef HAVE_SDL2 - return true; -#else - return api == GFX_CTX_OPENGL_API; +#ifndef HAVE_SDL2 + if (api != GFX_CTX_OPENGL_API) + return false; #endif + return true; } static void sdl_ctx_swap_interval(void *data, unsigned interval)