MCPcopy Create free account
hub / github.com/cinder/Cinder / ErrorCheckEndFrameSanityChecks

Method ErrorCheckEndFrameSanityChecks

src/imgui/imgui.cpp:10727–10744  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10725}
10726
10727static void ImGui::ErrorCheckEndFrameSanityChecks()
10728{
10729 // Verify that io.KeyXXX fields haven't been tampered with. Key mods should not be modified between NewFrame() and EndFrame()
10730 // One possible reason leading to this assert is that your backends update inputs _AFTER_ NewFrame().
10731 // It is known that when some modal native windows called mid-frame takes focus away, some backends such as GLFW will
10732 // send key release events mid-frame. This would normally trigger this assertion and lead to sheared inputs.
10733 // We silently accommodate for this case by ignoring the case where all io.KeyXXX modifiers were released (aka key_mod_flags == 0),
10734 // while still correctly asserting on mid-frame key press events.
10735 ImGuiContext& g = *GImGui;
10736 const ImGuiKeyChord key_mods = GetMergedModsFromKeys();
10737 IM_UNUSED(g);
10738 IM_UNUSED(key_mods);
10739 IM_ASSERT((key_mods == 0 || g.IO.KeyMods == key_mods) && "Mismatching io.KeyCtrl/io.KeyShift/io.KeyAlt/io.KeySuper vs io.KeyMods");
10740 IM_UNUSED(key_mods);
10741
10742 IM_ASSERT(g.CurrentWindowStack.Size == 1);
10743 IM_ASSERT(g.CurrentWindowStack[0].Window->IsFallbackWindow);
10744}
10745
10746// Save current stack sizes. Called e.g. by NewFrame() and by Begin() but may be called for manual recovery.
10747void ImGui::ErrorRecoveryStoreState(ImGuiErrorRecoveryState* state_out)

Callers

nothing calls this directly

Calls 1

GetMergedModsFromKeysFunction · 0.85

Tested by

no test coverage detected