mirror of
https://github.com/libretro/RetroArch
synced 2025-04-16 08:43:10 +00:00
allow glcore for every cores using gl
This commit is contained in:
parent
a2ac81b747
commit
1de6fc479e
36
retroarch.c
36
retroarch.c
@ -18940,7 +18940,8 @@ static bool dynamic_verify_hw_context(
|
|||||||
case RETRO_HW_CONTEXT_OPENGLES3:
|
case RETRO_HW_CONTEXT_OPENGLES3:
|
||||||
case RETRO_HW_CONTEXT_OPENGLES_VERSION:
|
case RETRO_HW_CONTEXT_OPENGLES_VERSION:
|
||||||
case RETRO_HW_CONTEXT_OPENGL:
|
case RETRO_HW_CONTEXT_OPENGL:
|
||||||
if (!string_is_equal(video_ident, "gl"))
|
if (!string_is_equal(video_ident, "gl") &&
|
||||||
|
!string_is_equal(video_ident, "glcore"))
|
||||||
return false;
|
return false;
|
||||||
break;
|
break;
|
||||||
case RETRO_HW_CONTEXT_DIRECT3D:
|
case RETRO_HW_CONTEXT_DIRECT3D:
|
||||||
@ -31743,13 +31744,13 @@ static bool hw_render_context_is_gl(enum retro_hw_context_type type)
|
|||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
|
case RETRO_HW_CONTEXT_OPENGLES2:
|
||||||
|
case RETRO_HW_CONTEXT_OPENGLES3:
|
||||||
|
case RETRO_HW_CONTEXT_OPENGLES_VERSION:
|
||||||
case RETRO_HW_CONTEXT_OPENGL:
|
case RETRO_HW_CONTEXT_OPENGL:
|
||||||
#ifndef HAVE_OPENGL_CORE
|
#ifndef HAVE_OPENGL_CORE
|
||||||
case RETRO_HW_CONTEXT_OPENGL_CORE:
|
case RETRO_HW_CONTEXT_OPENGL_CORE:
|
||||||
#endif
|
#endif
|
||||||
case RETRO_HW_CONTEXT_OPENGLES2:
|
|
||||||
case RETRO_HW_CONTEXT_OPENGLES3:
|
|
||||||
case RETRO_HW_CONTEXT_OPENGLES_VERSION:
|
|
||||||
return true;
|
return true;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
@ -33258,17 +33259,32 @@ static bool video_driver_find_driver(struct rarch_state *p_rarch)
|
|||||||
if (hwr && hw_render_context_is_gl(hwr->context_type))
|
if (hwr && hw_render_context_is_gl(hwr->context_type))
|
||||||
{
|
{
|
||||||
RARCH_LOG("[Video]: Using HW render, OpenGL driver forced.\n");
|
RARCH_LOG("[Video]: Using HW render, OpenGL driver forced.\n");
|
||||||
if (!string_is_equal(settings->arrays.video_driver, "gl"))
|
|
||||||
|
/* If we have configured one of the HW render capable GL drivers, go with that. */
|
||||||
|
if ( !string_is_equal(settings->arrays.video_driver, "gl") &&
|
||||||
|
!string_is_equal(settings->arrays.video_driver, "glcore"))
|
||||||
{
|
{
|
||||||
RARCH_LOG("[Video]: \"%s\" saved as cached driver.\n", settings->arrays.video_driver);
|
RARCH_LOG("[Video]: \"%s\" saved as cached driver.\n", settings->arrays.video_driver);
|
||||||
strlcpy(p_rarch->cached_video_driver,
|
strlcpy(p_rarch->cached_video_driver,
|
||||||
settings->arrays.video_driver,
|
settings->arrays.video_driver,
|
||||||
sizeof(p_rarch->cached_video_driver));
|
sizeof(p_rarch->cached_video_driver));
|
||||||
|
#if defined(HAVE_OPENGL_CORE)
|
||||||
|
RARCH_LOG("[Video]: Forcing \"glcore\" driver.\n");
|
||||||
configuration_set_string(settings,
|
configuration_set_string(settings,
|
||||||
settings->arrays.video_driver,
|
settings->arrays.video_driver, "glcore");
|
||||||
"gl");
|
p_rarch->current_video = &video_gl_core;
|
||||||
|
#else
|
||||||
|
RARCH_LOG("[Video]: Forcing \"gl\" driver.\n");
|
||||||
|
configuration_set_string(settings,
|
||||||
|
settings->arrays.video_driver, "gl");
|
||||||
|
p_rarch->current_video = &video_gl2;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
RARCH_LOG("[Video]: Using configured \"%s\" driver for GL HW render.\n",
|
||||||
|
settings->arrays.video_driver);
|
||||||
}
|
}
|
||||||
p_rarch->current_video = &video_gl2;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user