Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pointer sanitization - winraw, dinput, sdl (partial) #17283

Merged
merged 1 commit into from
Dec 25, 2024

Conversation

zoltanvb
Copy link
Contributor

Description

Adapt the sanitized pointer handling, discussed at #17196 :

winraw and dinput driver specific changes:

  • make sure pointer position is always within [-0x7fff,0x7fff] by using the confined wrapper
  • remove extra "inside" checks, general simplification
  • enable pointer offscreen reporting
  • use common functions for edge detection and lightgun button ID conversion

sdl driver specific changes:

  • pointer handling aligned with the other input drivers, as above
  • added TODO for lightgun part - no suitable test env at the moment where SDL input can be used

Tests done using remote retropad, windowed/fullscreen, pointer/lightgun, grab/no grab.

Related Pull Requests

#17169 (comment)

Adapt the sanitized pointer handling, discussed at libretro#17196 :

winraw and dinput driver specific changes:

    make sure pointer position is always within [-0x7fff,0x7fff] by using the confined wrapper
    remove extra "inside" checks, general simplification
    enable pointer offscreen reporting
    use common functions for edge detection and lightgun button ID conversion

sdl driver specific changes:

    pointer handling aligned with the other input drivers, as above
    added TODO for lightgun part - no suitable test env at the moment where SDL input can be used
@LibretroAdmin LibretroAdmin merged commit e5fde4d into libretro:master Dec 25, 2024
27 checks passed
Sunderland93 pushed a commit to Sunderland93/RetroArch that referenced this pull request Dec 26, 2024
Adapt the sanitized pointer handling, discussed at libretro#17196 :

winraw and dinput driver specific changes:

    make sure pointer position is always within [-0x7fff,0x7fff] by using the confined wrapper
    remove extra "inside" checks, general simplification
    enable pointer offscreen reporting
    use common functions for edge detection and lightgun button ID conversion

sdl driver specific changes:

    pointer handling aligned with the other input drivers, as above
    added TODO for lightgun part - no suitable test env at the moment where SDL input can be used
@zoltanvb zoltanvb deleted the pointer_sanitize_win branch January 9, 2025 21:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants