Make default graphics backend not show up as empty

Fixes https://bugs.dolphin-emu.org/issues/12245.

I considered making a change to DolphinQt instead of
the core, but then additional effort would've been
required to add the same fix to the Android GUI once
we start using the new config system there.
This commit is contained in:
JosJuice
2020-09-06 12:56:45 +02:00
parent db067104ed
commit 6eefc3c524
13 changed files with 37 additions and 8 deletions

View File

@ -197,9 +197,21 @@ u16 VideoBackendBase::Video_GetBoundingBox(int index)
return result;
}
// This function is called at static initialization, so we can't rely on s_default_backend being set
std::string VideoBackendBase::GetDefaultBackendName()
{
#ifdef HAS_OPENGL
return OGL::VideoBackend::NAME;
#elif defined(_WIN32)
return DX11::VideoBackend::NAME;
#else
return Vulkan::VideoBackend::NAME;
#endif
}
void VideoBackendBase::PopulateList()
{
// OGL > D3D11 > Vulkan > SW > Null
// OGL > D3D11 > D3D12 > Vulkan > SW > Null
#ifdef HAS_OPENGL
g_available_video_backends.push_back(std::make_unique<OGL::VideoBackend>());
#endif