mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-11 00:04:24 +00:00
parent
fe0a24f38a
commit
07490618ae
2 changed files with 10 additions and 0 deletions
|
|
@ -8852,6 +8852,13 @@ static void ImGui::ErrorCheckNewFrameSanityChecks()
|
|||
// #define IM_ASSERT(EXPR) do { if (SomeCode(EXPR)) SomeMoreCode(); } while (0) // Correct!
|
||||
if (true) IM_ASSERT(1); else IM_ASSERT(0);
|
||||
|
||||
// Emscripten backends are often imprecise in their submission of DeltaTime. (#6114, #3644)
|
||||
// Ideally the Emscripten app/backend should aim to fix or smooth this value and avoid feeding zero, but we tolerate it.
|
||||
#ifdef __EMSCRIPTEN__
|
||||
if (g.IO.DeltaTime <= 0.0f && g.FrameCount > 0)
|
||||
g.IO.DeltaTime = 0.00001f;
|
||||
#endif
|
||||
|
||||
// Check user data
|
||||
// (We pass an error message in the assert expression to make it visible to programmers who are not using a debugger, as most assert handlers display their argument)
|
||||
IM_ASSERT(g.Initialized);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue