From 4e77c63b974e3f714e621a913d32a86d1ae43cae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Thu, 10 Aug 2023 10:00:12 +0200 Subject: [PATCH] Move Present to the end of NativeFrame() --- UI/NativeApp.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/UI/NativeApp.cpp b/UI/NativeApp.cpp index 1289c7839c..d817a37823 100644 --- a/UI/NativeApp.cpp +++ b/UI/NativeApp.cpp @@ -1143,11 +1143,6 @@ void NativeFrame(GraphicsContext *graphicsContext) { } g_draw->EndFrame(); - // This, between EndFrame and Present, is where we should actually wait to do present time management. - // There might not be a meaningful distinction here for all backends.. - - g_draw->Present(); - if (resized) { INFO_LOG(G3D, "Resized flag set - recalculating bounds"); resized = false; @@ -1187,6 +1182,11 @@ void NativeFrame(GraphicsContext *graphicsContext) { // We're rendering fine, clear out failure info. ClearFailedGPUBackends(); } + + // This, between EndFrame and Present, is where we should actually wait to do present time management. + // There might not be a meaningful distinction here for all backends.. + + g_draw->Present(); } void HandleGlobalMessage(const std::string &msg, const std::string &value) {