Skip to content

[rcore][drm] Disable touch position simulation from mouse movement for touchscreen devices #4842#5279

Merged
raysan5 merged 1 commit into
raysan5:masterfrom
MULTidll:master
Oct 17, 2025
Merged

[rcore][drm] Disable touch position simulation from mouse movement for touchscreen devices #4842#5279
raysan5 merged 1 commit into
raysan5:masterfrom
MULTidll:master

Conversation

@MULTidll
Copy link
Copy Markdown
Contributor

Summary

  • Touch positions are now reset to an invalid state ({-1, -1}) instead of zero in fuction PollInputEvents from src/platforms/rcore_drm.c file, which helps avoid unintended touch detections on DRM touchscreen devices.
  • The mapping of mouse position to touch position is disabled for DRM touchscreen devices.

@MULTidll MULTidll changed the title Disable touch position simulation from mouse movement for DRM touchscreen devices #5010 Disable touch position simulation from mouse movement for DRM touchscreen devices #4842 Oct 16, 2025
@raysan5 raysan5 merged commit 311f624 into raysan5:master Oct 17, 2025
@raysan5
Copy link
Copy Markdown
Owner

raysan5 commented Oct 17, 2025

@MULTidll Merging the change because I understand you are working on DRM with a touch display at the moment but I'm not sure about the -1 convention, default state is 0, and if finally adopted, it requires to be reviewed in all platforms, so this change conditions multiple other changes for platform consistency.

@raysan5 raysan5 changed the title Disable touch position simulation from mouse movement for DRM touchscreen devices #4842 [rcore][drm] Disable touch position simulation from mouse movement for touchscreen devices #4842 Oct 17, 2025
@raysan5 raysan5 added the platform: DRM/RPI DRM/Raspberry Pi platform label Oct 17, 2025
@MULTidll
Copy link
Copy Markdown
Contributor Author

@raysan5 sure. yes indeed i understannd the usage of -1 convention would affect for other platforms I will try something if the issue can be rectified using the default 0 state , I would like to know if you have any suggestions to handle the issue in other way so that the default state is kept 0?

@MULTidll
Copy link
Copy Markdown
Contributor Author

@raysan5 So I guess if (0, 0) is the default, making (0, 0) not to be counted as a valid touch unless a real touch event sets it to (0,0), but this assumes that a real touch at (0,0) is very rare to happen so we would be needing to handle that special case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

platform: DRM/RPI DRM/Raspberry Pi platform

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants