Merge pull request #13078 from Dentomologist/videobackendbase_only_populate_backend_info_when_uninitialized

VideoBackendBase: Only populate backend info when uninitialized
This commit is contained in:
JosJuice 2024-10-04 18:31:06 +02:00 committed by GitHub
commit 2da3e49b1e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -284,9 +284,9 @@ void VideoBackendBase::ActivateBackend(const std::string& name)
void VideoBackendBase::PopulateBackendInfo(const WindowSystemInfo& wsi) void VideoBackendBase::PopulateBackendInfo(const WindowSystemInfo& wsi)
{ {
// If the core is running, the backend info will have been populated already. If we did it here, // If the core has been initialized, the backend info will have been populated already. Doing it
// the UI thread could race with the GPU thread. // again would be unnecessary and could cause the UI thread to race with the GPU thread.
if (Core::IsRunningOrStarting(Core::System::GetInstance())) if (Core::GetState(Core::System::GetInstance()) != Core::State::Uninitialized)
return; return;
g_Config.Refresh(); g_Config.Refresh();