From c994b1d1e1ed09eed83602ab18545c89d679414c Mon Sep 17 00:00:00 2001 From: Cancerous Date: Wed, 5 Feb 2020 11:12:01 -0500 Subject: [PATCH] [UI] - remove some useless code --- src/xenia/gpu/command_processor.cc | 12 ------------ src/xenia/ui/window.cc | 11 ----------- 2 files changed, 23 deletions(-) diff --git a/src/xenia/gpu/command_processor.cc b/src/xenia/gpu/command_processor.cc index 1eeaf52a4..98566a35a 100644 --- a/src/xenia/gpu/command_processor.cc +++ b/src/xenia/gpu/command_processor.cc @@ -26,8 +26,6 @@ #include "xenia/kernel/kernel_state.h" #include "xenia/kernel/user_module.h" -DECLARE_bool(fps_limit); - namespace xe { namespace gpu { @@ -831,16 +829,6 @@ bool CommandProcessor::ExecutePacketType3_XE_SWAP(RingBuffer* reader, ++counter_; - - // crude FPS limiter until one of you does a better implementation - if(cvars::fps_limit) { - - if (xe::Clock::QueryHostSystemTime() > swap_update_time_ns_ + 16666) { - swap_update_time_ns_ = xe::Clock::QueryHostSystemTime(); - } else { - xe::threading::MaybeYield(); - } - } return true; } diff --git a/src/xenia/ui/window.cc b/src/xenia/ui/window.cc index 03cd4cc74..dee320980 100644 --- a/src/xenia/ui/window.cc +++ b/src/xenia/ui/window.cc @@ -22,8 +22,6 @@ DEFINE_bool(fps_titlebar, true, "Show FPS in titlebar", "General"); -DEFINE_bool(fps_limit, false, "try to limit 2d games from being too fast", "Video"); - namespace xe { namespace ui { @@ -182,15 +180,6 @@ void Window::OnPaint(UIEvent* e) { ++fps_frame_count_; uint64_t now_ns = xe::Clock::QueryHostSystemTime(); - // crude FPS limiter until one of you does a better implementation - if(cvars::fps_limit) { - if (now_ns > fps_update_time_ns_ + 16666) { - // do nothing - } else { - xe::threading::MaybeYield(); - } - } - if (now_ns > fps_update_time_ns_ + 1000 * 10000) { fps_ = static_cast( fps_frame_count_ /