From e45fc3dc5658f107c1782990781ad5b7e4d0e5ab Mon Sep 17 00:00:00 2001 From: Ben Vanik Date: Sat, 31 May 2014 08:13:13 -0700 Subject: [PATCH] Reducing profiling forced swap frequency. --- src/xenia/gpu/d3d11/d3d11_graphics_system.cc | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/src/xenia/gpu/d3d11/d3d11_graphics_system.cc b/src/xenia/gpu/d3d11/d3d11_graphics_system.cc index 88fe0f205..553ed8828 100644 --- a/src/xenia/gpu/d3d11/d3d11_graphics_system.cc +++ b/src/xenia/gpu/d3d11/d3d11_graphics_system.cc @@ -164,14 +164,16 @@ void D3D11GraphicsSystem::Pump() { DispatchInterruptCallback(0); } else { - // If we have gone too long without an interrupt, fire one. - if (xe_pal_now() - last_interrupt_time_ > 500 / 1000.0) { + double time_since_last_interrupt = xe_pal_now() - last_interrupt_time_; + if (time_since_last_interrupt > 0.5) { + // If we have gone too long without an interrupt, fire one. DispatchInterruptCallback(0); } - - // Force a swap when profiling. - if (Profiler::is_enabled()) { - window_->Swap(); + if (time_since_last_interrupt > 0.3) { + // Force a swap when profiling. + if (Profiler::is_enabled()) { + window_->Swap(); + } } } }