Skip to content

Commit

Permalink
refactor: move OpenGL to the bottom
Browse files Browse the repository at this point in the history
order of entries should follow what we want users to use
  • Loading branch information
NikhilNarayana committed Sep 21, 2023
1 parent 0388784 commit 2fd0a9d
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions Source/Core/VideoCommon/VideoBackendBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -229,15 +229,12 @@ const std::vector<std::unique_ptr<VideoBackendBase>>& VideoBackendBase::GetAvail
std::vector<std::unique_ptr<VideoBackendBase>> backends;

// Mainline prefers OGL > D3D11 > D3D12 > Vulkan > SW > Null
// Slippi will instead prefer D3D11 > D3D12 > OGL > Vulkan > SW > Null
// Slippi will instead prefer D3D11 > D3D12 > Vulkan > OGL > SW > Null
// SLIPPITODO: Check what works best in practice for each OS
#ifdef _WIN32
backends.push_back(std::make_unique<DX11::VideoBackend>());
backends.push_back(std::make_unique<DX12::VideoBackend>());
#endif
#ifdef HAS_OPENGL
backends.push_back(std::make_unique<OGL::VideoBackend>());
#endif
#ifdef HAS_VULKAN
#ifdef __APPLE__
// Emplace the Vulkan backend at the beginning so it takes precedence over OpenGL.
Expand All @@ -250,6 +247,7 @@ const std::vector<std::unique_ptr<VideoBackendBase>>& VideoBackendBase::GetAvail
backends.emplace(backends.begin(), std::make_unique<Metal::VideoBackend>());
#endif
#ifdef HAS_OPENGL
backends.push_back(std::make_unique<OGL::VideoBackend>());
backends.push_back(std::make_unique<SW::VideoSoftware>());
#endif
backends.push_back(std::make_unique<Null::VideoBackend>());
Expand Down

0 comments on commit 2fd0a9d

Please sign in to comment.