mirror of
https://github.com/libretro/RetroArch
synced 2025-03-31 10:20:41 +00:00
Fix for cached driver not restoring back to old one with vulkan override.
This commit is contained in:
parent
4ac264b1d0
commit
011078f991
14
retroarch.c
14
retroarch.c
@ -4971,6 +4971,7 @@ bool command_event(enum event_command cmd, void *data)
|
||||
settings_t *settings = configuration_settings;
|
||||
strcpy(settings->arrays.video_driver, cached_video_driver);
|
||||
cached_video_driver[0] = 0;
|
||||
RARCH_LOG("[Video]: Restored video driver to \"%s\".\n", settings->arrays.video_driver);
|
||||
}
|
||||
|
||||
if ( runloop_remaps_core_active
|
||||
@ -6134,6 +6135,7 @@ void main_exit(void *args)
|
||||
{
|
||||
strcpy(settings->arrays.video_driver, cached_video_driver);
|
||||
cached_video_driver[0] = 0;
|
||||
RARCH_LOG("[Video]: Restored video driver to \"%s\".\n", settings->arrays.video_driver);
|
||||
}
|
||||
|
||||
if (settings->bools.config_save_on_exit)
|
||||
@ -19230,8 +19232,12 @@ static bool video_driver_find_driver(void)
|
||||
if (hwr && hw_render_context_is_vulkan(hwr->context_type))
|
||||
{
|
||||
RARCH_LOG("[Video]: Using HW render, Vulkan driver forced.\n");
|
||||
if (!string_is_equal(settings->arrays.video_driver, "vulkan"))
|
||||
{
|
||||
RARCH_LOG("[Video]: \"%s\" saved as cached driver.\n", settings->arrays.video_driver);
|
||||
strcpy(cached_video_driver, settings->arrays.video_driver);
|
||||
strcpy(settings->arrays.video_driver, "vulkan");
|
||||
}
|
||||
current_video = &video_vulkan;
|
||||
}
|
||||
#endif
|
||||
@ -19245,16 +19251,16 @@ static bool video_driver_find_driver(void)
|
||||
if ( !string_is_equal(settings->arrays.video_driver, "gl") &&
|
||||
!string_is_equal(settings->arrays.video_driver, "glcore"))
|
||||
{
|
||||
#if defined(HAVE_OPENGL_CORE)
|
||||
RARCH_LOG("[Video]: \"%s\" saved as cached driver.\n", settings->arrays.video_driver);
|
||||
strcpy(cached_video_driver, settings->arrays.video_driver);
|
||||
#if defined(HAVE_OPENGL_CORE)
|
||||
RARCH_LOG("[Video]: Forcing \"glcore\" driver.\n");
|
||||
strcpy(settings->arrays.video_driver, "glcore");
|
||||
current_video = &video_gl_core;
|
||||
RARCH_LOG("[Video]: Forcing \"glcore\" driver.\n");
|
||||
#else
|
||||
strcpy(cached_video_driver, settings->arrays.video_driver);
|
||||
RARCH_LOG("[Video]: Forcing \"gl\" driver.\n");
|
||||
strcpy(settings->arrays.video_driver, "gl");
|
||||
current_video = &video_gl2;
|
||||
RARCH_LOG("[Video]: Forcing \"gl\" driver.\n");
|
||||
#endif
|
||||
}
|
||||
else
|
||||
|
Loading…
x
Reference in New Issue
Block a user