mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-15 12:37:05 +02:00
Merge pull request #5414 from birarda/slow-events
allow the QEvent queue in Application to get behind
This commit is contained in:
commit
939638a3a8
1 changed files with 2 additions and 13 deletions
|
@ -1802,13 +1802,6 @@ void Application::idle() {
|
|||
}
|
||||
double timeSinceLastUpdate = (double)_lastTimeUpdated.nsecsElapsed() / 1000000.0;
|
||||
if (timeSinceLastUpdate > targetFramePeriod) {
|
||||
|
||||
{
|
||||
static const int IDLE_EVENT_PROCESS_MAX_TIME_MS = 2;
|
||||
PerformanceTimer perfTimer("processEvents");
|
||||
processEvents(QEventLoop::AllEvents, IDLE_EVENT_PROCESS_MAX_TIME_MS);
|
||||
}
|
||||
|
||||
_lastTimeUpdated.start();
|
||||
{
|
||||
PerformanceTimer perfTimer("update");
|
||||
|
@ -1840,12 +1833,8 @@ void Application::idle() {
|
|||
// Once rendering is off on another thread we should be able to have Application::idle run at start(0) in
|
||||
// perpetuity and not expect events to get backed up.
|
||||
|
||||
static const int IDLE_TIMER_DELAY_MS = 0;
|
||||
int desiredInterval = _glWidget->isThrottleRendering() ? THROTTLED_IDLE_TIMER_DELAY : IDLE_TIMER_DELAY_MS;
|
||||
|
||||
if (idleTimer->interval() != desiredInterval) {
|
||||
idleTimer->start(desiredInterval);
|
||||
}
|
||||
static const int IDLE_TIMER_DELAY_MS = 2;
|
||||
idleTimer->start(_glWidget->isThrottleRendering() ? THROTTLED_IDLE_TIMER_DELAY : IDLE_TIMER_DELAY_MS);
|
||||
}
|
||||
|
||||
// check for any requested background downloads.
|
||||
|
|
Loading…
Reference in a new issue