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

An attempt to make native multi-point touch & on-screen keyboard toggle both available to users #1364

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
2e863b0
rename App
TrueZhuangJia Mar 18, 2024
285d628
Re-enable native multi-touch.
TrueZhuangJia Mar 18, 2024
1c3472c
Enhanced touch with manipulated pointer coordinates, and long press j…
TrueZhuangJia May 6, 2024
3452365
Add multi-finger tap to toggle Android on-screen keyboard
TrueZhuangJia May 6, 2024
9bbba77
Improve multi-finger tap in native touch (invoking keyboard toggle), …
TrueZhuangJia May 7, 2024
0ec9ed0
Cancel multiFingerTapChecker in ACTION_UP
TrueZhuangJia May 8, 2024
4b5a21e
Merge branch 'branchForUpdate' into Moonlight-TZJ-EnhancedTouch
TrueZhuangJia May 8, 2024
d40223f
Resolve conflicts
TrueZhuangJia May 8, 2024
d065e6e
Update README.md
TrueZhuangJia May 9, 2024
1ca6d02
Update README.md
TrueZhuangJia May 9, 2024
af0aea4
Refactor NativeTouchHandler to NativeTouchContext
TrueZhuangJia May 11, 2024
8ce5b1f
Use Map instead of ArrayList to store NativeTouchContext.Pointer inst…
TrueZhuangJia May 11, 2024
f72d5a8
Update README.md
TrueZhuangJia May 12, 2024
0789afa
all NativeTouchContext related codes switched ON/OFF by prefConfig.en…
TrueZhuangJia May 12, 2024
b60fec9
Cancel fixed X(horizontal) velocity, since it deosn't make much sense.
TrueZhuangJia May 12, 2024
e679c65
Merge branch 'NativeTouchContext.Pointer_Map' into Moonlight-TZJ-Enha…
TrueZhuangJia May 12, 2024
7bf05bc
Set max pointer velocity factor to 500%, for better view rotation twe…
TrueZhuangJia May 14, 2024
bbac484
Update README.md
TrueZhuangJia Jul 7, 2024
9490776
Update README.md
TrueZhuangJia Aug 18, 2024
7fe0f30
Update README.md
TrueZhuangJia Aug 18, 2024
46ee16b
Merge pull request #2 from moonlight-stream/master
TrueZhuangJia Sep 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,5 @@ build/
app/.externalNativeBuild/

# NDK stuff
.cxx/
.cxx/
app/src/main/jni/moonlight-core/Build.txt
32 changes: 32 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,35 @@
# 首个实现多点触控 灵敏度调节 (触点移速调节) 的 Moonlight分支. <br>
# The first Moonlight fork to implement multi-touch sensitivity tweak (touch point velocity tweak)
# I'm currently working on my moonlight-iOS fork, with too much deviations from the original version:
https://github.com/Moonlight-the-Fried-Fish/moonlight-ios-NativeMultiTouchPassthrough


# Features of this fork:

允许调整触点在右分屏或分屏的移速, 对调节米家游戏视角转动的灵敏度尤其有用。
This is a fork with some manipulation on native multi-touch pointer coordinaties, allows pointer to move faster or slower on specified enhanced touch zone.
Maybe useful for tweaking view rotation sensitivity in some games.
<br><br>

![image](https://github.com/TrueZhuangJia/moonlight-android-Enhanced-MultiTouch/assets/78474576/3bd8efeb-89ab-477d-b501-22f25cdb8fc6)
![image](https://github.com/TrueZhuangJia/moonlight-android-Enhanced-MultiTouch/assets/78474576/0d58b391-71ef-48be-82f8-6fef1649e2eb)


恢复原版moonlight多指敲击屏幕唤醒本地键盘的方式, 同时允许设置敲击手指数量 <br>
Configurable local keyboard toggle: <br>
![image](https://github.com/TrueZhuangJia/moonlight-android-Enhanced-MultiTouch/assets/78474576/416a2960-f0a7-4245-ac62-d8fb53ec4ca7)
![image](https://github.com/TrueZhuangJia/moonlight-android-Enhanced-MultiTouch/assets/78474576/a0edaf21-a174-448e-832c-da2d171cefea)


还有两个的功能, 使用中你可能未必能感觉到有区别:<br>
And some additional features like flat region to eliminate long press jitter:<br>
![image](https://github.com/TrueZhuangJia/moonlight-android-Enhanced-MultiTouch/assets/78474576/0594b3ef-e381-4efc-bc2b-db8f209db272)
![image](https://github.com/TrueZhuangJia/moonlight-android-Enhanced-MultiTouch/assets/78474576/98534adc-48ad-4433-8d7c-e60b88c13466)


触控与显示同步的话,可能有助理于视角旋转时画面的流畅性。


# Moonlight Android

[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/232a8tadrrn8jv0k/branch/master?svg=true)](https://ci.appveyor.com/project/cgutman/moonlight-android/branch/master)
Expand Down
4 changes: 2 additions & 2 deletions app/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ android {
buildTypes {
debug {
applicationIdSuffix ".debug"
resValue "string", "app_label", "Moonlight (Debug)"
resValue "string", "app_label_root", "Moonlight (Root Debug)"
resValue "string", "app_label", "Moonlight-搓屏砖家版"
resValue "string", "app_label_root", "Moonlight-搓屏砖家版"

minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
Expand Down
141 changes: 118 additions & 23 deletions app/src/main/java/com/limelight/Game.java

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import android.os.Handler;
import android.os.Looper;
import android.view.View;

import com.limelight.nvstream.NvConnection;
import com.limelight.nvstream.input.MouseButtonPacket;

Expand Down Expand Up @@ -195,13 +194,11 @@ public boolean touchMoveEvent(int eventX, int eventY, long eventTime)
if (cancelled) {
return true;
}

if (actionIndex == 0) {
if (distanceExceeds(eventX - lastTouchDownX, eventY - lastTouchDownY, LONG_PRESS_DISTANCE_THRESHOLD)) {
// Moved too far since touch down. Cancel the long press timer.
cancelLongPressTimer();
}

// Ignore motion within the deadzone period after touch down
if (confirmedTap || distanceExceeds(eventX - lastTouchDownX, eventY - lastTouchDownY, TOUCH_DOWN_DEAD_ZONE_DISTANCE_THRESHOLD)) {
tapConfirmed();
Expand Down
Loading