From 2772d8a7f5ac817362359a5b043b7e9a688a8c65 Mon Sep 17 00:00:00 2001 From: Cancerous Date: Mon, 27 Jan 2020 19:31:22 -0500 Subject: [PATCH] [UI] - less impact to limiting frames --- src/xenia/gpu/command_processor.cc | 2 -- src/xenia/ui/window.cc | 3 +-- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/src/xenia/gpu/command_processor.cc b/src/xenia/gpu/command_processor.cc index 381e2b30c..1eeaf52a4 100644 --- a/src/xenia/gpu/command_processor.cc +++ b/src/xenia/gpu/command_processor.cc @@ -839,8 +839,6 @@ bool CommandProcessor::ExecutePacketType3_XE_SWAP(RingBuffer* reader, swap_update_time_ns_ = xe::Clock::QueryHostSystemTime(); } else { xe::threading::MaybeYield(); - xe::threading::Sleep(std::chrono::nanoseconds((swap_update_time_ns_ + - 16666) - xe::Clock::QueryHostSystemTime())); } } return true; diff --git a/src/xenia/ui/window.cc b/src/xenia/ui/window.cc index 2af2bf944..03cd4cc74 100644 --- a/src/xenia/ui/window.cc +++ b/src/xenia/ui/window.cc @@ -187,8 +187,7 @@ void Window::OnPaint(UIEvent* e) { if (now_ns > fps_update_time_ns_ + 16666) { // do nothing } else { - xe::threading::Sleep(std::chrono::nanoseconds((fps_update_time_ns_ + - 16666) - now_ns)); + xe::threading::MaybeYield(); } }