summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/VideoBackendBase.cpp
diff options
context:
space:
mode:
authorDentomologist <dentomologist@gmail.com>2024-09-27 12:05:01 -0700
committerDentomologist <dentomologist@gmail.com>2024-09-27 12:20:48 -0700
commitdc1b961c09e009d53fcf3e74f5ce0f2375ec5dcc (patch)
tree43a4241e2e1c87c8369706b8ec027bd343a2e7d7 /Source/Core/VideoCommon/VideoBackendBase.cpp
parent2cb124bd3ae0392a3fd7b683b55790d2fe826da8 (diff)
VideoBackendBase: Only populate backend info when uninitialized
Prevent potential issues when creating the Graphics window (and thus calling PopulateBackendInfo) while the core state is Stopping, like we already do while it's Starting or Running.
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();