mirror of
https://github.com/libretro/RetroArch
synced 2025-03-17 19:21:09 +00:00
parent
df3af35ee4
commit
7a3ddcd77d
29
retroarch.c
29
retroarch.c
@ -22363,21 +22363,20 @@ bool video_driver_is_threaded(void)
|
|||||||
return video_driver_is_threaded_internal();
|
return video_driver_is_threaded_internal();
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef HAVE_VULKAN
|
#if defined(HAVE_VULKAN)
|
||||||
static bool hw_render_context_is_vulkan(enum retro_hw_context_type type)
|
static bool hw_render_context_is_vulkan(enum retro_hw_context_type type)
|
||||||
{
|
{
|
||||||
return type == RETRO_HW_CONTEXT_VULKAN;
|
return type == RETRO_HW_CONTEXT_VULKAN;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(HAVE_OPENGL) || defined(HAVE_OPENGL_CORE)
|
#if defined(HAVE_OPENGL)
|
||||||
static bool hw_render_context_is_gl(enum retro_hw_context_type type)
|
static bool hw_render_context_is_gl(enum retro_hw_context_type type)
|
||||||
{
|
{
|
||||||
switch (type)
|
switch (type)
|
||||||
{
|
{
|
||||||
case RETRO_HW_CONTEXT_OPENGL:
|
case RETRO_HW_CONTEXT_OPENGL:
|
||||||
case RETRO_HW_CONTEXT_OPENGLES2:
|
case RETRO_HW_CONTEXT_OPENGLES2:
|
||||||
case RETRO_HW_CONTEXT_OPENGL_CORE:
|
|
||||||
case RETRO_HW_CONTEXT_OPENGLES3:
|
case RETRO_HW_CONTEXT_OPENGLES3:
|
||||||
case RETRO_HW_CONTEXT_OPENGLES_VERSION:
|
case RETRO_HW_CONTEXT_OPENGLES_VERSION:
|
||||||
return true;
|
return true;
|
||||||
@ -22389,6 +22388,13 @@ static bool hw_render_context_is_gl(enum retro_hw_context_type type)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_OPENGL_CORE)
|
||||||
|
static bool hw_render_context_is_glcore(enum retro_hw_context_type type)
|
||||||
|
{
|
||||||
|
return type == RETRO_HW_CONTEXT_OPENGL_CORE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool *video_driver_get_threaded(void)
|
bool *video_driver_get_threaded(void)
|
||||||
{
|
{
|
||||||
#if defined(__MACH__) && defined(__APPLE__)
|
#if defined(__MACH__) && defined(__APPLE__)
|
||||||
@ -23702,6 +23708,23 @@ static bool video_driver_find_driver(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_OPENGL_CORE)
|
||||||
|
if (hwr && hw_render_context_is_glcore(hwr->context_type))
|
||||||
|
{
|
||||||
|
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);
|
||||||
|
strlcpy(cached_video_driver, settings->arrays.video_driver,
|
||||||
|
sizeof(cached_video_driver));
|
||||||
|
configuration_set_string(settings,
|
||||||
|
settings->arrays.video_driver,
|
||||||
|
"glcore");
|
||||||
|
}
|
||||||
|
current_video = &video_gl_core;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
if (current_video)
|
if (current_video)
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user