Skip to content

Commit 102f3f3

Browse files
committed
IO: variations in analog-only components of gamepad events do not interfere with trickling of mouse position events (#4921, #8508)
1 parent 979c7d7 commit 102f3f3

File tree

3 files changed

+11
-5
lines changed

3 files changed

+11
-5
lines changed

docs/CHANGELOG.txt

+2
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ Breaking changes:
4343

4444
Other changes:
4545

46+
- IO: variations in analog-only components of gamepad events do not interfere
47+
with trickling of mouse position events (#4921, #8508)
4648
- Error Handling: added better error report and recovery for extraneous
4749
EndPopup() call. (#1651, #8499)
4850
- Style, InputText: added ImGuiCol_InputTextCursor to configure color of

imgui.cpp

+8-4
Original file line numberDiff line numberDiff line change
@@ -9868,12 +9868,16 @@ void ImGui::UpdateInputEvents(bool trickle_fast_inputs)
98689868
if (trickle_interleaved_nonchar_keys_and_text && (text_inputted && !key_is_potentially_for_char_input))
98699869
break;
98709870

9871+
if (key_data->Down != e->Key.Down) // Analog change only do not trigger this, so it won't block e.g. further mouse pos events testing key_changed.
9872+
{
9873+
key_changed = true;
9874+
key_changed_mask.SetBit(key_data_index);
9875+
if (trickle_interleaved_nonchar_keys_and_text && !key_is_potentially_for_char_input)
9876+
key_changed_nonchar = true;
9877+
}
9878+
98719879
key_data->Down = e->Key.Down;
98729880
key_data->AnalogValue = e->Key.AnalogValue;
9873-
key_changed = true;
9874-
key_changed_mask.SetBit(key_data_index);
9875-
if (trickle_interleaved_nonchar_keys_and_text && !key_is_potentially_for_char_input)
9876-
key_changed_nonchar = true;
98779881
}
98789882
else if (e->Type == ImGuiInputEventType_Text)
98799883
{

imgui.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
// Library Version
3030
// (Integer encoded as XYYZZ for use in #if preprocessor conditionals, e.g. '#if IMGUI_VERSION_NUM >= 12345')
3131
#define IMGUI_VERSION "1.92.0 WIP"
32-
#define IMGUI_VERSION_NUM 19191
32+
#define IMGUI_VERSION_NUM 19192
3333
#define IMGUI_HAS_TABLE
3434

3535
/*

0 commit comments

Comments
 (0)