summaryrefslogtreecommitdiff
path: root/Source/Core/VideoCommon/Present.cpp
diff options
context:
space:
mode:
authorTellowKrinkle <tellowkrinkle@gmail.com>2024-09-30 18:29:38 -0500
committerTellowKrinkle <tellowkrinkle@gmail.com>2024-10-02 19:22:16 -0500
commit7e1a9490c0112358b4a6593f6e4ec23bb5d1201b (patch)
treee2aa46d103b0c38605fa84df2803d4d6570b037c /Source/Core/VideoCommon/Present.cpp
parentc7cbac538ab22b00c8b20d329fb02141430751bd (diff)
VideoBackends:Vulkan: Don't try to present if swapchain acquire failed
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.