|
|
@ -6905,9 +6905,13 @@ static void ImGui::ErrorCheckEndFrameSanityChecks()
|
|
|
|
|
|
|
|
|
|
|
|
// Verify that io.KeyXXX fields haven't been tampered with. Key mods should not be modified between NewFrame() and EndFrame()
|
|
|
|
// Verify that io.KeyXXX fields haven't been tampered with. Key mods should not be modified between NewFrame() and EndFrame()
|
|
|
|
// One possible reason leading to this assert is that your backends update inputs _AFTER_ NewFrame().
|
|
|
|
// One possible reason leading to this assert is that your backends update inputs _AFTER_ NewFrame().
|
|
|
|
const ImGuiKeyModFlags expected_key_mod_flags = GetMergedKeyModFlags();
|
|
|
|
// It is known that when some modal native windows called mid-frame takes focus away, some backends such as GLFW will
|
|
|
|
IM_ASSERT(g.IO.KeyMods == expected_key_mod_flags && "Mismatching io.KeyCtrl/io.KeyShift/io.KeyAlt/io.KeySuper vs io.KeyMods");
|
|
|
|
// send key release events mid-frame. This would normally trigger this assertion and lead to sheared inputs.
|
|
|
|
IM_UNUSED(expected_key_mod_flags);
|
|
|
|
// We silently accommodate for this case by ignoring/ the case where all io.KeyXXX modifiers were released (aka key_mod_flags == 0),
|
|
|
|
|
|
|
|
// while still correctly asserting on mid-frame key press events.
|
|
|
|
|
|
|
|
const ImGuiKeyModFlags key_mod_flags = GetMergedKeyModFlags();
|
|
|
|
|
|
|
|
IM_ASSERT((key_mod_flags == 0 || g.IO.KeyMods == key_mod_flags) && "Mismatching io.KeyCtrl/io.KeyShift/io.KeyAlt/io.KeySuper vs io.KeyMods");
|
|
|
|
|
|
|
|
IM_UNUSED(key_mod_flags);
|
|
|
|
|
|
|
|
|
|
|
|
// Report when there is a mismatch of Begin/BeginChild vs End/EndChild calls. Important: Remember that the Begin/BeginChild API requires you
|
|
|
|
// Report when there is a mismatch of Begin/BeginChild vs End/EndChild calls. Important: Remember that the Begin/BeginChild API requires you
|
|
|
|
// to always call End/EndChild even if Begin/BeginChild returns false! (this is unfortunately inconsistent with most other Begin* API).
|
|
|
|
// to always call End/EndChild even if Begin/BeginChild returns false! (this is unfortunately inconsistent with most other Begin* API).
|
|
|
|