Reducing profiling forced swap frequency.

This commit is contained in:
Ben Vanik 2014-05-31 08:13:13 -07:00
parent 430d827770
commit e45fc3dc56
1 changed files with 8 additions and 6 deletions

View File

@ -164,14 +164,16 @@ void D3D11GraphicsSystem::Pump() {
DispatchInterruptCallback(0); DispatchInterruptCallback(0);
} else { } else {
// If we have gone too long without an interrupt, fire one. double time_since_last_interrupt = xe_pal_now() - last_interrupt_time_;
if (xe_pal_now() - last_interrupt_time_ > 500 / 1000.0) { if (time_since_last_interrupt > 0.5) {
// If we have gone too long without an interrupt, fire one.
DispatchInterruptCallback(0); DispatchInterruptCallback(0);
} }
if (time_since_last_interrupt > 0.3) {
// Force a swap when profiling. // Force a swap when profiling.
if (Profiler::is_enabled()) { if (Profiler::is_enabled()) {
window_->Swap(); window_->Swap();
}
} }
} }
} }