summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VideoBackendBase.cpp
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2024-10-04 18:31:06 +0200
committerGitHub <noreply@github.com>2024-10-04 18:31:06 +0200
commit2da3e49b1e876a28c93ad990c71e5d4bb2441f5b (patch)
treedd69ff0425532b666ddfaa686662069c1736b61a /Source/Core/VideoCommon/VideoBackendBase.cpp
parent76287f3810b4af9ef058bff6f86fbde862f4f78d (diff)
parentdc1b961c09e009d53fcf3e74f5ce0f2375ec5dcc (diff)
Merge pull request #13078 from Dentomologist/videobackendbase_only_populate_backend_info_when_uninitialized
VideoBackendBase: Only populate backend info when uninitialized
Diffstat (limited to 'Source/Core/VideoCommon/VideoBackendBase.cpp')
-rw-r--r--Source/Core/VideoCommon/VideoBackendBase.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/VideoBackendBase.cpp b/Source/Core/VideoCommon/VideoBackendBase.cpp
index ab5e6c9fe6..8124c2eeb3 100644
--- a/Source/Core/VideoCommon/VideoBackendBase.cpp
+++ b/Source/Core/VideoCommon/VideoBackendBase.cpp
@@ -284,9 +284,9 @@ void VideoBackendBase::ActivateBackend(const std::string& name)
void VideoBackendBase::PopulateBackendInfo(const WindowSystemInfo& wsi)
{
- // If the core is running, the backend info will have been populated already. If we did it here,
- // the UI thread could race with the GPU thread.
- if (Core::IsRunningOrStarting(Core::System::GetInstance()))
+ // If the core has been initialized, the backend info will have been populated already. Doing it
+ // again would be unnecessary and could cause the UI thread to race with the GPU thread.
+ if (Core::GetState(Core::System::GetInstance()) != Core::State::Uninitialized)
return;
g_Config.Refresh();