MCPcopy Create free account
hub / github.com/PCSX2/pcsx2 / ErrorCheckEndFrameSanityChecks

Method ErrorCheckEndFrameSanityChecks

3rdparty/imgui/src/imgui.cpp:10981–10998  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10979}
10980
10981static void ImGui::ErrorCheckEndFrameSanityChecks()
10982{
10983 // Verify that io.KeyXXX fields haven't been tampered with. Key mods should not be modified between NewFrame() and EndFrame()
10984 // One possible reason leading to this assert is that your backends update inputs _AFTER_ NewFrame().
10985 // It is known that when some modal native windows called mid-frame takes focus away, some backends such as GLFW will
10986 // send key release events mid-frame. This would normally trigger this assertion and lead to sheared inputs.
10987 // We silently accommodate for this case by ignoring the case where all io.KeyXXX modifiers were released (aka key_mod_flags == 0),
10988 // while still correctly asserting on mid-frame key press events.
10989 ImGuiContext& g = *GImGui;
10990 const ImGuiKeyChord key_mods = GetMergedModsFromKeys();
10991 IM_UNUSED(g);
10992 IM_UNUSED(key_mods);
10993 IM_ASSERT((key_mods == 0 || g.IO.KeyMods == key_mods) && "Mismatching io.KeyCtrl/io.KeyShift/io.KeyAlt/io.KeySuper vs io.KeyMods");
10994 IM_UNUSED(key_mods);
10995
10996 IM_ASSERT(g.CurrentWindowStack.Size == 1);
10997 IM_ASSERT(g.CurrentWindowStack[0].Window->IsFallbackWindow);
10998}
10999
11000// Save current stack sizes. Called e.g. by NewFrame() and by Begin() but may be called for manual recovery.
11001void ImGui::ErrorRecoveryStoreState(ImGuiErrorRecoveryState* state_out)

Callers

nothing calls this directly

Calls 1

GetMergedModsFromKeysFunction · 0.85

Tested by

no test coverage detected