Emulate tablet-class pen capabilities for osu!lazer input#6
Emulate tablet-class pen capabilities for osu!lazer input#6sciboy12 wants to merge 2 commits intorewrite-scaling-config-reworkfrom
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 107f9fedc4
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (got_x && got_y) { | ||
| if (!emit_abs_delta(x, y, true, true)) { |
There was a problem hiding this comment.
Emit movement when either axis changes per frame
Many evdev tablets emit only the axis that changed before SYN_REPORT (e.g., pure horizontal movement can be ABS_X only). The new if (got_x && got_y) condition drops those frames, so single-axis motion is not forwarded until the other axis changes, which makes the cursor stall or jump and is a functional regression from the previous x_dirty || y_dirty behavior.
Useful? React with 👍 / 👎.
Motivation
Description
init_uinput()to advertise pen/tablet features by enablingBTN_TOOL_PEN,BTN_TOUCH,ABS_PRESSURE, andINPUT_PROP_DIRECT, and setABS_PRESSURErange to0..8191.emit_pen_tool_state()and call it each active-loop iteration to continuously signalBTN_TOOL_PEN=1with aSYN_REPORTso the OS sees a pen tool present.ABS_X/ABS_Yvalues and only callemit_abs_delta(x, y, true, true)at a SYN-frame boundary (EV_SYN/SYN_REPORT) when both axes are available, preventing per-axis immediate emission.BTN_LEFThandling to mirror contact ontoBTN_TOUCHand emitBTN_LEFT+BTN_TOUCH+SYN_REPORTin a single batched write, and added internalpressure/is_downtracking for future pressure emission.Testing
cd /workspace/Abs-C && make, but the build failed in this environment due to missing development headers (ini.handcjson/cJSON.h), so full compile/runtime validation could not be completed.Codex Task