Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SDL backend] Additional fallback options for macOS and Linux #4052

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions lib/sdl/main_sdl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -475,6 +475,26 @@ static video_backend wzGetNextFallbackGfxBackendForCurrentSystem(const video_bac
// offer Vulkan (which uses Vulkan -> Metal) as a fallback option if OpenGL failed
next_backend = video_backend::vulkan;
break;
case video_backend::vulkan:
// offer OpenGL
next_backend = video_backend::opengl;
break;
default:
// offer usual default
next_backend = wzGetDefaultGfxBackendForCurrentSystem();
break;
}
#elif defined(WZ_OS_UNIX)
switch (current_failed_backend)
{
case video_backend::opengl:
// offer Vulkan
next_backend = video_backend::vulkan;
break;
case video_backend::vulkan:
// offer OpenGL
next_backend = video_backend::opengl;
break;
default:
// offer usual default
next_backend = wzGetDefaultGfxBackendForCurrentSystem();
Expand Down
Loading