|
@@ -4049,7 +4049,6 @@ void ImGui::NewFrame()
|
|
|
|
|
|
// Update keyboard input state
|
|
// Update keyboard input state
|
|
// Synchronize io.KeyMods with individual modifiers io.KeyXXX bools
|
|
// Synchronize io.KeyMods with individual modifiers io.KeyXXX bools
|
|
- g.IO.KeyModsPrev = g.IO.KeyMods;
|
|
|
|
g.IO.KeyMods = GetMergedKeyModFlags();
|
|
g.IO.KeyMods = GetMergedKeyModFlags();
|
|
memcpy(g.IO.KeysDownDurationPrev, g.IO.KeysDownDuration, sizeof(g.IO.KeysDownDuration));
|
|
memcpy(g.IO.KeysDownDurationPrev, g.IO.KeysDownDuration, sizeof(g.IO.KeysDownDuration));
|
|
for (int i = 0; i < IM_ARRAYSIZE(g.IO.KeysDown); i++)
|
|
for (int i = 0; i < IM_ARRAYSIZE(g.IO.KeysDown); i++)
|
|
@@ -4487,6 +4486,7 @@ void ImGui::EndFrame()
|
|
// Clear Input data for next frame
|
|
// Clear Input data for next frame
|
|
g.IO.MouseWheel = g.IO.MouseWheelH = 0.0f;
|
|
g.IO.MouseWheel = g.IO.MouseWheelH = 0.0f;
|
|
g.IO.InputQueueCharacters.resize(0);
|
|
g.IO.InputQueueCharacters.resize(0);
|
|
|
|
+ g.IO.KeyModsPrev = g.IO.KeyMods; // doing it here is better than in NewFrame() as we'll tolerate backend writing to KeyMods. If we want to firmly disallow it we should detect it.
|
|
memset(g.IO.NavInputs, 0, sizeof(g.IO.NavInputs));
|
|
memset(g.IO.NavInputs, 0, sizeof(g.IO.NavInputs));
|
|
|
|
|
|
CallContextHooks(&g, ImGuiContextHookType_EndFramePost);
|
|
CallContextHooks(&g, ImGuiContextHookType_EndFramePost);
|