diff options
| author | Tilka <tilkax@gmail.com> | 2024-09-27 05:38:37 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-27 05:38:37 +0100 |
| commit | 61836e5d8e9df7a9c9d36f4b2f8447a3d64757f3 (patch) | |
| tree | 7423f1e1fff0d5b28c69bf406e584dda4a6a7066 /Source/Core/VideoCommon/VideoBackendBase.cpp | |
| parent | b1cd4a6690241f2372fc7ef1471e4e23f1366ac1 (diff) | |
| parent | 0a1084fad58ca6e340802021bd2e0d48ad7180ed (diff) | |
Merge pull request #13077 from Dentomologist/graphicswindow_fix_first_opening_during_emulation_startup_crash
GraphicsWindow: Fix crash when opening for the first time during emulation startup
Diffstat (limited to 'Source/Core/VideoCommon/VideoBackendBase.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/VideoBackendBase.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/Source/Core/VideoCommon/VideoBackendBase.cpp b/Source/Core/VideoCommon/VideoBackendBase.cpp index 1db7fb2ab6..ab5e6c9fe6 100644 --- a/Source/Core/VideoCommon/VideoBackendBase.cpp +++ b/Source/Core/VideoCommon/VideoBackendBase.cpp @@ -284,6 +284,11 @@ 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())) + return; + g_Config.Refresh(); // Reset backend_info so if the backend forgets to initialize something it doesn't end up using // a value from the previously used renderer @@ -296,14 +301,6 @@ void VideoBackendBase::PopulateBackendInfo(const WindowSystemInfo& wsi) g_Config.VerifyValidity(); } -void VideoBackendBase::PopulateBackendInfoFromUI(const WindowSystemInfo& wsi) -{ - // If the core is running, the backend info will have been populated already. - // If we did it here, the UI thread can race with the with the GPU thread. - if (!Core::IsRunning(Core::System::GetInstance())) - PopulateBackendInfo(wsi); -} - void VideoBackendBase::DoState(PointerWrap& p) { auto& system = Core::System::GetInstance(); |
