mirror of
https://github.com/Drezil/imgui.git
synced 2025-07-04 12:08:47 +02:00
Inputs: Fixed a miscalculation in the keyboard/mouse "typematic" repeat delay/rate calculation, used by keys and e.g. repeating mouse buttons as well as the GetKeyPressedAmount() function.
IMPORTANT: Renamed internal CalcTypematicPressedRepeatAmount to CalcTypematicRepeatAmount and reordered the t1, t0 arguments to t0, t1 !! If you were using a non-default value for io.KeyRepeatRate (previous default was 0.250), you can add +io.KeyRepeatDelay to it to compensate for the fix. The function was triggering on: 0.0 and (delay+rate*N) where (N>=1). Fixed formula responds to (N>=0). Effectively it made io.KeyRepeatRate behave like it was set to (io.KeyRepeatRate + io.KeyRepeatDelay). Fixed the code and altered default io.KeyRepeatRate,Delay from 0.250,0.050 to 0.300,0.050 to compensate. If you never altered io.KeyRepeatRate nor used GetKeyPressedAmount() this won't affect you.
This commit is contained in:
@ -34,11 +34,18 @@ HOW TO UPDATE?
|
||||
-----------------------------------------------------------------------
|
||||
|
||||
Breaking Changes:
|
||||
-
|
||||
- Inputs: Fixed a miscalculation in the keyboard/mouse "typematic" repeat delay/rate calculation, used
|
||||
by keys and e.g. repeating mouse buttons as well as the GetKeyPressedAmount() function.
|
||||
If you were using a non-default value for io.KeyRepeatRate (previous default was 0.250), you can
|
||||
add +io.KeyRepeatDelay to it to compensate for the fix.
|
||||
The function was triggering on: 0.0 and (delay+rate*N) where (N>=1). Fixed formula responds to (N>=0).
|
||||
Effectively it made io.KeyRepeatRate behave like it was set to (io.KeyRepeatRate + io.KeyRepeatDelay).
|
||||
Fixed the code and altered default io.KeyRepeatRate,Delay from 0.250,0.050 to 0.300,0.050 to compensate.
|
||||
If you never altered io.KeyRepeatRate nor used GetKeyPressedAmount() this won't affect you.
|
||||
|
||||
Other Changes:
|
||||
- InputText, Nav: Fixed Home/End key broken when activating Keyboard Navigation. (#787)
|
||||
- InputText: Filter out Ascii 127 (DEL) emitted by low-level OSX layer, as we are using the Key value. (#2578)
|
||||
- InputText: Filter out ASCII 127 (DEL) emitted by low-level OSX layer, as we are using the Key value. (#2578)
|
||||
- TreeNode: Fixed combination of ImGuiTreeNodeFlags_SpanFullWidth and ImGuiTreeNodeFlags_OpenOnArrow
|
||||
incorrectly locating the arrow hit position to the left of the frame. (#2451, #2438, #1897)
|
||||
- DragScalar, SliderScalar, InputScalar: Added p_ prefix to parameter that are pointers to the data
|
||||
|
Reference in New Issue
Block a user