diff --git a/gfx/drivers_font/gl_raster_font.c b/gfx/drivers_font/gl_raster_font.c index f6b749df79..5d057747b4 100644 --- a/gfx/drivers_font/gl_raster_font.c +++ b/gfx/drivers_font/gl_raster_font.c @@ -60,13 +60,19 @@ static bool gl_raster_font_upload_atlas(gl_raster_t *font, uint8_t *tmp = NULL; struct retro_hw_render_callback *cb = video_driver_callback(); bool ancient = false; /* add a check here if needed */ - -#ifndef HAVE_OPENGLES bool modern = font->gl->core_context || (cb->context_type == RETRO_HW_CONTEXT_OPENGL && cb->version_major >= 3); - if (modern) + if (ancient) + { + gl_internal = gl_format = GL_RGBA; + ncomponents = 4; + } +#ifdef HAVE_OPENGLES + (void)modern; +#else + else if (modern) { GLint swizzle[] = { GL_ONE, GL_ONE, GL_ONE, GL_RED }; glTexParameteriv(GL_TEXTURE_2D, GL_TEXTURE_SWIZZLE_RGBA, swizzle); @@ -75,13 +81,7 @@ static bool gl_raster_font_upload_atlas(gl_raster_t *font, gl_format = GL_RED; ncomponents = 1; } - else #endif - if (ancient) - { - gl_internal = gl_format = GL_RGBA; - ncomponents = 4; - } tmp = (uint8_t*)calloc(height, width * ncomponents);