From 794e06b890b69592b87f1d7bb6249f1b4acd1181 Mon Sep 17 00:00:00 2001 From: tobid7 Date: Sat, 21 Mar 2026 16:47:16 +0100 Subject: [PATCH] Present DX9 Frames ... --- tests/gfx/source/os/desktopos.cpp | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/gfx/source/os/desktopos.cpp b/tests/gfx/source/os/desktopos.cpp index 6a451da..109d0b9 100644 --- a/tests/gfx/source/os/desktopos.cpp +++ b/tests/gfx/source/os/desktopos.cpp @@ -105,7 +105,18 @@ void DesktopOS::ClearViewPort() { } } -void DesktopOS::SwapBuffers() { glfwSwapBuffers(impl->win); } +void DesktopOS::SwapBuffers() { + if (pDriver == Driver::DirectX9) { +#ifdef _WIN32 + if (impl->dx9_device) { + impl->dx9_device->EndScene(); + impl->dx9_device->Present(nullptr, nullptr, nullptr, nullptr); + } +#endif + } else { + glfwSwapBuffers(impl->win); + } +} } // namespace PD #endif \ No newline at end of file