Fix high CPU usage issue with emscripten demos.

This commit is contained in:
Martín Lucas Golini
2022-10-16 19:39:16 -03:00
parent 4b6ce692b9
commit 2d53c07c4b
6 changed files with 19 additions and 6 deletions

View File

@@ -478,7 +478,9 @@ void App::mainLoop() {
firstFrame = false;
}
} else {
#if EE_PLATFORM != EE_PLATFORM_EMSCRIPTEN
mWindow->getInput()->waitEvent( Milliseconds( mWindow->hasFocus() ? 16 : 100 ) );
#endif
}
if ( mBenchmarkMode && mSecondsCounter.getElapsedTime() >= Seconds( 1 ) ) {