mirror of
https://github.com/jpd002/Play-.git
synced 2025-04-28 13:47:57 +03:00
Fix frame limiter on WASM.
This commit is contained in:
parent
1ebd24b869
commit
15ecb34e85
1 changed files with 2 additions and 2 deletions
|
@ -64,8 +64,8 @@ void CFrameLimiter::EndFrame()
|
|||
WaitForSingleObject(timer, INFINITE);
|
||||
CloseHandle(timer);
|
||||
}
|
||||
#elif defined(__APPLE__)
|
||||
//Sleeping for the whole delay on macOS/iOS doesn't provide a good enough resolution
|
||||
#elif defined(__APPLE__) || defined(__EMSCRIPTEN__)
|
||||
//Sleeping for the whole delay on some platforms doesn't provide a good enough resolution
|
||||
auto currentTime = std::chrono::high_resolution_clock::now();
|
||||
auto targetTime = currentTime + delay;
|
||||
while(currentTime < targetTime)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue