mirror of
https://github.com/libretro/RetroArch
synced 2025-02-01 00:32:46 +00:00
Revert "(video) fix "Allow Cores to Switch the Video Driver OFF" behavior"
This commit is contained in:
parent
31ff7e384f
commit
d1f4279b8f
33
retroarch.c
33
retroarch.c
@ -9946,11 +9946,9 @@ static bool dynamic_verify_hw_context(enum retro_hw_context_type type,
|
||||
case RETRO_HW_CONTEXT_OPENGLES3:
|
||||
case RETRO_HW_CONTEXT_OPENGLES_VERSION:
|
||||
case RETRO_HW_CONTEXT_OPENGL:
|
||||
if (!string_is_equal(video_ident, "gl"))
|
||||
return false;
|
||||
break;
|
||||
case RETRO_HW_CONTEXT_OPENGL_CORE:
|
||||
if (!string_is_equal(video_ident, "glcore"))
|
||||
if (!string_is_equal(video_ident, "gl") &&
|
||||
!string_is_equal(video_ident, "glcore"))
|
||||
return false;
|
||||
break;
|
||||
case RETRO_HW_CONTEXT_DIRECT3D:
|
||||
@ -22342,27 +22340,42 @@ static bool video_driver_find_driver(void)
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGL)
|
||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL_CORE)
|
||||
if (hwr && hw_render_context_is_gl(hwr->context_type))
|
||||
{
|
||||
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);
|
||||
strlcpy(cached_video_driver, settings->arrays.video_driver,
|
||||
sizeof(cached_video_driver));
|
||||
#if defined(HAVE_OPENGL_CORE)
|
||||
RARCH_LOG("[Video]: Forcing \"glcore\" driver.\n");
|
||||
configuration_set_string(settings,
|
||||
settings->arrays.video_driver,
|
||||
"gl");
|
||||
settings->arrays.video_driver, "glcore");
|
||||
current_video = &video_gl_core;
|
||||
#else
|
||||
RARCH_LOG("[Video]: Forcing \"gl\" driver.\n");
|
||||
configuration_set_string(settings,
|
||||
settings->arrays.video_driver, "gl");
|
||||
current_video = &video_gl2;
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
RARCH_LOG("[Video]: Using configured \"%s\" driver for GL HW render.\n",
|
||||
settings->arrays.video_driver);
|
||||
}
|
||||
current_video = &video_gl2;
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(HAVE_OPENGL_CORE)
|
||||
if (hwr && hw_render_context_is_glcore(hwr->context_type))
|
||||
{
|
||||
RARCH_LOG("[Video]: Using HW render, core OpenGL driver forced.\n");
|
||||
RARCH_LOG("[Video]: Using HW render, OpenGL core driver forced.\n");
|
||||
if (!string_is_equal(settings->arrays.video_driver, "glcore"))
|
||||
{
|
||||
RARCH_LOG("[Video]: \"%s\" saved as cached driver.\n", settings->arrays.video_driver);
|
||||
|
Loading…
x
Reference in New Issue
Block a user