Skip to content

Fixes IOHIDEvent/UITouch phase mismatch that causes some games#223

Open
DaDaweiZhou wants to merge 4 commits into
PlayCover:masterfrom
DaDaweiZhou:master
Open

Fixes IOHIDEvent/UITouch phase mismatch that causes some games#223
DaDaweiZhou wants to merge 4 commits into
PlayCover:masterfrom
DaDaweiZhou:master

Conversation

@DaDaweiZhou

Copy link
Copy Markdown
  • Rebuild IOHIDEvent in setPhaseAndUpdateTimestamp: so eventMask stays in sync with UITouch.phase (was only set on touch creation)
  • Fix kif_IOHIDEventWithTouches eventMask for ended/cancelled phases
  • Use per-finger timestamps for more realistic HID events

Some games validate that IOHIDEvent properties match the current UITouch phase. Without this fix, moved/ended touches carry a stale began-phase IOHIDEvent, triggering detection.

- Rebuild IOHIDEvent in setPhaseAndUpdateTimestamp: so eventMask
  stays in sync with UITouch.phase (was only set on touch creation)
- Fix kif_IOHIDEventWithTouches eventMask for ended/cancelled phases
- Use per-finger timestamps for more realistic HID events

Some games validate that IOHIDEvent properties match the current
UITouch phase. Without this fix, moved/ended touches carry a stale
began-phase IOHIDEvent, triggering detection.
@TheMoonThatRises

Copy link
Copy Markdown
Member

Can the comments for handEvent and fingerEvent be added back for parameter clarity?

@DaDaweiZhou

Copy link
Copy Markdown
Author

@TheMoonThatRises Thanks for your comments, fix already.

Comment thread PlayTools/Controls/PTFakeTouch/Additions/IOHIDEvent+KIF.m
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