moonlight-ios
moonlight-ios copied to clipboard
Add passthrough touch support for windows native multi-touch
Adding support for sending touch events to Sunshine hosts directly.
This has been asked in multiple issues (incomplete list)
- https://github.com/moonlight-stream/moonlight-ios/issues/597
- https://github.com/moonlight-stream/moonlight-ios/issues/596
- https://github.com/moonlight-stream/moonlight-ios/issues/518
Summary of changes
- A new "passthrough touch events" option is added in settings when "Touchscreen" mode is on :
Once turned on, touch events will be routed to Sunshine hosts via the LiSendTouchEvent
API, and appears as natively multi touch events on Windows.
-
When passthrough mode is enabled, the pop-up keyboard would require 5 fingers tap to fire up. This avoids conflicting with windows native gestures. (According to the touch-gestures-for-windows, windows has native touch gestures use up to 4 fingers, so 5 fingers tap provides a good guarantee). Windows also offers a built-in on-screen touch keyboard when multi-touch events are received, making the pop-up keyboard less crucial than before.
-
A performance tweak (turning off UIScrollView delaysContentTouches). While I was on this I noticed the "pin & pan & scroll" feature in absolute touch mode brings in unwanted delay due to the default settings of ScrollView, which might have caused the following issues regarding delays:
- https://github.com/moonlight-stream/moonlight-ios/issues/496
- https://github.com/moonlight-stream/moonlight-ios/issues/489 The delay It is pretty noticeable in windows paint app.