diff --git a/src/framework/application.cpp b/src/framework/application.cpp index 07c16bcf..fa24d336 100644 --- a/src/framework/application.cpp +++ b/src/framework/application.cpp @@ -244,9 +244,9 @@ void Application::run() m_backgroundFrameCounter.update(); m_foregroundFrameCounter.update(); - int sleepMicros = std::min(m_backgroundFrameCounter.getMaximumSleepMicros(), m_foregroundFrameCounter.getMaximumSleepMicros()); + int sleepMicros = m_backgroundFrameCounter.getMaximumSleepMicros(); if(sleepMicros >= AdaptativeFrameCounter::MINIMUM_MICROS_SLEEP) - stdext::microsleep(AdaptativeFrameCounter::MINIMUM_MICROS_SLEEP); + stdext::microsleep(sleepMicros); } else { // sleeps until next poll to avoid massive cpu usage