Skip to content

Commit

Permalink
[SDL backend] Additional fallback options for macOS and Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
past-due committed Aug 27, 2024
1 parent eaacca9 commit 35d9112
Showing 1 changed file with 20 additions and 0 deletions.
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

0 comments on commit 35d9112

Please sign in to comment.