Commit Graph
10 Commits
Author SHA1 Message Date
Henrik Rydgård 9315c0953a GamepadEmu: bounds-check touch pointer IDs before use
TouchInput::id was used directly to index the global primaryButton[]
array (MultiTouchButton::Touch) and to shift pointer bitmasks
(PSPDpad/PSPStick/PSPCustomStick/GestureGamepad::Touch), guarded only
by a debug-only assert in one of the five call sites - a no-op in
release builds. input.id isn't always a small sequential slot in
[0, TOUCH_MAX_POINTERS): SDL assigns SDL_FingerID values directly,
Android pointer IDs can go up to 31, and UWP's TouchMapper allocates
one more slot (11) than TOUCH_MAX_POINTERS (10) and can also return -1
when it runs out of slots - all reachable through ordinary multi-touch
use, no malicious input required.

Also apply bounds check to the PER_GAME gesture config ints
(iDoubleTapGesture/iSwipeUp/Down/Left/Right) before indexing
GestureKey::keyList[] with them.

Additionally, minor cleanup on Android and moves the TouchMapper helper
out from UWP to InputState.h.
2026-08-12 09:47:13 +02:00
SternXD f78d6a2c68 UWP: Purge Windows Mobile 2026-08-10 04:59:55 -04:00
SternXD 952987e56e UWP: Migrate from C++/CX to C++/WinRT
Signed-off-by: SternXD <stern@sidestore.io>
2026-01-04 10:07:07 -05:00
Bashar Astifan 04d72ebe54 UWP improvements 2 2023-08-23 02:25:57 +04:00
Henrik Rydgård f9c37cce56 Fix for weird Xbox B button behavior, see #10948. A simpler change was tested to work by Ruler. 2019-01-22 22:02:04 +01:00
Henrik Rydgård 22782b6439 UWP: Fix DPI calculations for touch. Implement back button support. 2017-03-23 10:02:29 +01:00
Henrik Rydgard c02060594d Fix touch events on mobile Windows 10 2017-03-23 10:02:28 +01:00
Henrik Rydgard 4ced81b1df UWP: Hook up basic touch/mouse input. Start work on loading from a StorageFile. Getting closer to starting to boot a game 2017-03-23 10:02:28 +01:00
Henrik Rydgard 86f4559748 UWP: Hook up basic keyboard support 2017-03-23 10:02:28 +01:00
Henrik Rydgard 3c52570552 Add UWP projects and rough UWP entry point application based on the sample
Delete sample load, hook things up. It now builds but doesn't run

Reformat, add an event
2017-03-23 10:02:27 +01:00