Commit b9cf1b7
committed
fix: narrow rumble re-entry guard, shrink input memcmp, clamp vibration intensity
- evshim.c: replace per-slot atomic g_keepalive_active with a thread-local
t_keepalive_active. The atomic was reachable from any thread, so a
legitimate cross-thread OnRumble during the keepalive's SDL_JoystickRumble
window would be silently dropped. Only same-thread synchronous re-entry
needs suppressing, which is exactly what TLS catches.
- evshim.c: shrink vjoy_updater's memcmp to offsetof(gamepad_io,
low_freq_rumble) so rumble writes at offset 32 no longer trip the input-
changed branch and cause redundant SDL_JoystickSetVirtualAxis/Button/Hat
replays each inotify wakeup.
- evshim.c: drop the unreachable close(ino_fd)/return NULL tail after the
for(;;) loop in vjoy_updater. The loop has no break; the early-return
paths above run before ino_fd is opened.
- evshim.c: remove now-unused <stdatomic.h> include; add <stddef.h> for
offsetof.
- XServerScreen.kt: clamp vibrationIntensity to 0..100 with coerceIn after
toIntOrNull, so out-of-range container extras can't violate the
WinHandler.setVibrationIntensity contract.1 parent 8b1c6bc commit b9cf1b7
2 files changed
Lines changed: 14 additions & 14 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
| 10 | + | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
16 | 17 | | |
17 | | - | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| |||
89 | 91 | | |
90 | 92 | | |
91 | 93 | | |
92 | | - | |
| 94 | + | |
93 | 95 | | |
94 | 96 | | |
95 | 97 | | |
| |||
179 | 181 | | |
180 | 182 | | |
181 | 183 | | |
182 | | - | |
| 184 | + | |
183 | 185 | | |
184 | 186 | | |
185 | 187 | | |
| |||
220 | 222 | | |
221 | 223 | | |
222 | 224 | | |
223 | | - | |
| 225 | + | |
224 | 226 | | |
225 | | - | |
| 227 | + | |
226 | 228 | | |
227 | 229 | | |
228 | 230 | | |
| |||
241 | 243 | | |
242 | 244 | | |
243 | 245 | | |
244 | | - | |
245 | | - | |
246 | | - | |
247 | | - | |
248 | 246 | | |
249 | 247 | | |
250 | 248 | | |
| |||
Lines changed: 3 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1782 | 1782 | | |
1783 | 1783 | | |
1784 | 1784 | | |
1785 | | - | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
1786 | 1788 | | |
1787 | 1789 | | |
1788 | 1790 | | |
| |||
0 commit comments