summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Present.cpp
diff options
context:
space:
mode:
authorJMC47 <JMC4789@gmail.com>2024-10-02 21:09:25 -0400
committerGitHub <noreply@github.com>2024-10-02 21:09:25 -0400
commite259831bcfb90b6d27d28114b9350786543cba6c (patch)
treef2bbb8648814260053f4ca351dca5f7eba1ffd3e /Source/Core/VideoCommon/Present.cpp
parent122bce08deb8953f69668a2da1e48672699b0322 (diff)
parenta267c5641203e36d4d10ddf75e94bbe33a9e6c7b (diff)
Merge pull request #13087 from TellowKrinkle/PresentSkip
VideoBackends:Vulkan: Prevent freezes during window resize on Linux
Diffstat (limited to 'Source/Core/VideoCommon/Present.cpp')
-rw-r--r--Source/Core/VideoCommon/Present.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/Source/Core/VideoCommon/Present.cpp b/Source/Core/VideoCommon/Present.cpp
index c7ae018bbc..6813c7a4e3 100644
--- a/Source/Core/VideoCommon/Present.cpp
+++ b/Source/Core/VideoCommon/Present.cpp
@@ -844,10 +844,10 @@ void Presenter::Present()
UpdateDrawRectangle();
g_gfx->BeginUtilityDrawing();
- g_gfx->BindBackbuffer({{0.0f, 0.0f, 0.0f, 1.0f}});
+ const bool backbuffer_bound = g_gfx->BindBackbuffer({{0.0f, 0.0f, 0.0f, 1.0f}});
// Render the XFB to the screen.
- if (m_xfb_entry)
+ if (backbuffer_bound && m_xfb_entry)
{
// Adjust the source rectangle instead of using an oversized viewport to render the XFB.
auto render_target_rc = GetTargetRectangle();
@@ -860,7 +860,8 @@ void Presenter::Present()
if (m_onscreen_ui)
{
m_onscreen_ui->Finalize();
- m_onscreen_ui->DrawImGui();
+ if (backbuffer_bound)
+ m_onscreen_ui->DrawImGui();
}
// Present to the window system.