VideoCommon: Simplify VideoBackendBase::GetDefaultBackendName
Now we can just call GetDefaultVideoBackend to get the default backend and get its name by calling GetName.
This commit is contained in:
parent
aaaa3896c0
commit
d08b80828d
|
@ -206,16 +206,10 @@ static VideoBackendBase* GetDefaultVideoBackend()
|
||||||
return backends.front().get();
|
return backends.front().get();
|
||||||
}
|
}
|
||||||
|
|
||||||
// This function is called at static initialization, so we can't rely on s_default_backend being set
|
|
||||||
std::string VideoBackendBase::GetDefaultBackendName()
|
std::string VideoBackendBase::GetDefaultBackendName()
|
||||||
{
|
{
|
||||||
#ifdef HAS_OPENGL
|
auto* default_backend = GetDefaultVideoBackend();
|
||||||
return OGL::VideoBackend::NAME;
|
return default_backend ? default_backend->GetName() : "";
|
||||||
#elif defined(_WIN32)
|
|
||||||
return DX11::VideoBackend::NAME;
|
|
||||||
#else
|
|
||||||
return Vulkan::VideoBackend::NAME;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const std::vector<std::unique_ptr<VideoBackendBase>>& VideoBackendBase::GetAvailableBackends()
|
const std::vector<std::unique_ptr<VideoBackendBase>>& VideoBackendBase::GetAvailableBackends()
|
||||||
|
|
Loading…
Reference in New Issue