mirror of
https://github.com/wolfpld/tracy
synced 2025-04-30 12:53:51 +00:00
Limit time delta to 0.1s.
This commit is contained in:
parent
9e6214350c
commit
b80ede3ec6
@ -521,7 +521,7 @@ void Backend::NewFrame( int& w, int& h )
|
|||||||
ImGui_ImplOpenGL3_NewFrame();
|
ImGui_ImplOpenGL3_NewFrame();
|
||||||
|
|
||||||
uint64_t time = std::chrono::duration_cast<std::chrono::microseconds>( std::chrono::high_resolution_clock::now().time_since_epoch() ).count();
|
uint64_t time = std::chrono::duration_cast<std::chrono::microseconds>( std::chrono::high_resolution_clock::now().time_since_epoch() ).count();
|
||||||
io.DeltaTime = ( time - s_time ) / 1000000.f;
|
io.DeltaTime = std::min( 0.1f, ( time - s_time ) / 1000000.f );
|
||||||
s_time = time;
|
s_time = time;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user