[PR #1723] [MERGED] Add touch gliding #659

Open
opened 2026-01-29 19:08:58 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/stenzek/duckstation/pull/1723
Author: @PookaMustard
Created: 3/2/2021
Status: Merged
Merged: 3/6/2021
Merged by: @stenzek

Base: masterHead: master


📝 Commits (6)

  • 6950491 Add touch gliding
  • b296f08 Add attributes for glidability
  • 8b8dc8e Account for touch glide attributes
  • f08f963 Ditching glidabitliy arrays
  • 3e256f3 Merge pull request #1 from PookaMustard/pooka-touch-gliding
  • 45e5668 Change var name to be consistent with feature name

📊 Changes

2 files changed (+38 additions, -17 deletions)

View changed files

📝 android/app/src/main/java/com/github/stenzek/duckstation/TouchscreenControllerButtonView.java (+4 -0)
📝 android/app/src/main/java/com/github/stenzek/duckstation/TouchscreenControllerView.java (+34 -17)

📄 Description

This PR adds the functionality I requested in #1065, that is, touch gliding (for lack of a better name) for Android. The commit has been tested extensively for the better part of a day on a real phone.

This basically keeps the first button held as long as your finger keeps touching the screen. This lets you hold square and then glide/slide over to X to charge and jump as Spyro with minimal effort, using your touchscreen. It also supports multiple touch traces, perfect for games like, I don't know, Crash Team Racing (X to Circle for using items without losing speed, R1<>L1 for drifting and boosting, both can happen concurrently).

How does this work:
A map (mFirstHolds) is available for linking touch pointer IDs to button views. When you touch the screen, a pointer is made. Now, when your pointer starts on, or goes to the first button, the map saves the pointerID>buttonview combo. Any future buttons this pointer slides over are not saved in the combo, but will be activated, and when you slide away it will disable, but the first button remains on. You can do this for as many fingers as you can possibly get on the screen, and they'll be treated separately.

The moment one of your pointers let go of the screen, the combo that was mapped is deleted. When all pointers are released, the map is wholly cleared.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/stenzek/duckstation/pull/1723 **Author:** [@PookaMustard](https://github.com/PookaMustard) **Created:** 3/2/2021 **Status:** ✅ Merged **Merged:** 3/6/2021 **Merged by:** [@stenzek](https://github.com/stenzek) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (6) - [`6950491`](https://github.com/stenzek/duckstation/commit/6950491409de2bd956794275a855941d3a34926d) Add touch gliding - [`b296f08`](https://github.com/stenzek/duckstation/commit/b296f0850fb3ffd8d6ab656da61cc354b8079fbb) Add attributes for glidability - [`8b8dc8e`](https://github.com/stenzek/duckstation/commit/8b8dc8e23a63dd89c21d40572140d57c559221ad) Account for touch glide attributes - [`f08f963`](https://github.com/stenzek/duckstation/commit/f08f963cdf158eabd73d00863d7890a3c155cb54) Ditching glidabitliy arrays - [`3e256f3`](https://github.com/stenzek/duckstation/commit/3e256f3089502ffdcbc09aef0cc237b3c951b06e) Merge pull request #1 from PookaMustard/pooka-touch-gliding - [`45e5668`](https://github.com/stenzek/duckstation/commit/45e566842fd177ce6c5da1ea29dfe87a16e52414) Change var name to be consistent with feature name ### 📊 Changes **2 files changed** (+38 additions, -17 deletions) <details> <summary>View changed files</summary> 📝 `android/app/src/main/java/com/github/stenzek/duckstation/TouchscreenControllerButtonView.java` (+4 -0) 📝 `android/app/src/main/java/com/github/stenzek/duckstation/TouchscreenControllerView.java` (+34 -17) </details> ### 📄 Description This PR adds the functionality I requested in #1065, that is, touch gliding (for lack of a better name) for Android. The commit has been tested extensively for the better part of a day on a real phone. This basically keeps the first button held as long as your finger keeps touching the screen. This lets you hold square and then glide/slide over to X to charge and jump as Spyro with minimal effort, using your touchscreen. It also supports multiple touch traces, perfect for games like, I don't know, Crash Team Racing (X to Circle for using items without losing speed, R1<>L1 for drifting and boosting, both can happen concurrently). How does this work: A map (mFirstHolds) is available for linking touch pointer IDs to button views. When you touch the screen, a pointer is made. Now, when your pointer starts on, or goes to the first button, the map saves the pointerID>buttonview combo. Any future buttons this pointer slides over are not saved in the combo, but will be activated, and when you slide away it will disable, but the first button remains on. You can do this for as many fingers as you can possibly get on the screen, and they'll be treated separately. The moment one of your pointers let go of the screen, the combo that was mapped is deleted. When all pointers are released, the map is wholly cleared. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 19:08:58 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/duckstation#659