diff options
| author | JosJuice <josjuice@gmail.com> | 2020-09-06 12:56:45 +0200 |
|---|---|---|
| committer | JosJuice <josjuice@gmail.com> | 2020-09-06 12:56:45 +0200 |
| commit | 6eefc3c524a8530a3cb24b5c797288e156bec1db (patch) | |
| tree | fdf2a4acd73d0a201ffaf4d9c6cd8a755ef5f1f9 /Source/Core/VideoCommon/VideoBackendBase.cpp | |
| parent | db067104ed42debf28e60f31c31131ae2a7c8441 (diff) | |
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.
Diffstat (limited to 'Source/Core/VideoCommon/VideoBackendBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VideoBackendBase.cpp | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Source/Core/VideoCommon/VideoBackendBase.cpp b/Source/Core/VideoCommon/VideoBackendBase.cpp index 5e7337c767..b32cff86e3 100644 --- a/Source/Core/VideoCommon/VideoBackendBase.cpp +++ b/Source/Core/VideoCommon/VideoBackendBase.cpp @@ -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 |
