sensitivity tweak for direction touchpads (wasdpad, arrowpad, dpad)

This commit is contained in:
TrueZhuangjia authored and TrueZhuanjia committed 2025-03-24 01:24:15 +08:00
1 parent 9aa84c03d7
commit 7b116b936c
17 files changed
+39 -40

No files matched your search

+2 -2
View File
@@ -2,8 +2,8 @@
// KeyManager.swift
// Moonlight-ZWM
//
// Created by ZWM on 2024/7/23.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/7/23.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
import Foundation
+2 -2
View File
@@ -2,8 +2,8 @@
// CustomTapGestureRecognizer.h
// Moonlight
//
// Created by ZWM on 2024/5/15.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/5/15.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
#ifndef CustomTapGestureRecognizer_h
+2 -2
View File
@@ -2,8 +2,8 @@
// CustomTapGestureRecognizer.m
// Moonlight
//
// Created by ZWM on 2024/5/15.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/5/15.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
#import <Foundation/Foundation.h>
+2 -2
View File
@@ -2,8 +2,8 @@
// NativeTouchHandler.h
// Moonlight
//
// Created by ZWM on 2024/6/16.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/6/16.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
+2 -2
View File
@@ -2,8 +2,8 @@
// NativeTouchHandler.m
// Moonlight
//
// Created by ZWM on 2024/6/16.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/6/16.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
#import <Foundation/Foundation.h>
+2 -2
View File
@@ -2,8 +2,8 @@
// NativeTouchPointer.h
// Moonlight
//
// Created by ZWM on 2024/5/14.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/5/14.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
#import "StreamView.h"
+2 -2
View File
@@ -2,8 +2,8 @@
// NativeTouchPointer.m
// Moonlight
//
// Created by ZWM on 2024/5/14.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/5/14.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
#import <Foundation/Foundation.h>
+7 -7
View File
@@ -2,8 +2,8 @@
// OnScreenKey.swift
// Moonlight-ZWM
//
// Created by ZWM on 2024/8/4.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/8/4.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
import UIKit
@@ -149,9 +149,9 @@ import UIKit
self.touchPadString = touchPadString
self.buttonString = self.comboButtonStrings.first ?? ""
let stickAndMouseTouchpads = ["LSPAD", "RSPAD", "LSVPAD", "RSVPAD", "MOUSEPAD"]
// let stickAndMouseTouchpads = ["LSPAD", "RSPAD", "LSVPAD", "RSVPAD", "MOUSEPAD"]
let nonVectorStickPads = ["LSPAD", "RSPAD"]
if stickAndMouseTouchpads.contains(self.touchPadString) {self.hasSensitivityTweak = true}
if CommandManager.touchPadCmds.contains(self.touchPadString) {self.hasSensitivityTweak = true}
if nonVectorStickPads.contains(self.touchPadString) && widgetType == WidgetTypeEnum.touchPad {self.hasStickIndicator = true}
switch self.cmdString {
@@ -630,7 +630,7 @@ import UIKit
case down = 8
}
let nearZeroPoint = abs(offSetX)<28 && abs(offSetY)<28
let nearZeroPoint = abs(offSetX) < 16/sensitivityFactor && abs(offSetY) < 16/sensitivityFactor
// NSLog("deltaX: %f, detalY: %f", deltaX, deltaY)
var buttonPressed = 0;
@@ -975,10 +975,10 @@ import UIKit
case "DPAD", "WASDPAD", "ARROWPAD":
self.lrudIndicatorBall = createAndShowLrudBall(at: touchBeganLocation)
if quickDoubleTapDetected {
LiSendKeyboardEvent(CommandManager.keyboardButtonMappings[self.buttonString]!,Int8(KEY_ACTION_DOWN), 0)
self.sendComboButtonsDownEvent(comboStrings: self.comboButtonStrings)
DispatchQueue.global(qos: .userInitiated).async {
usleep(100000)
LiSendKeyboardEvent(CommandManager.keyboardButtonMappings[self.buttonString]!,Int8(KEY_ACTION_UP), 0)
self.sendComboButtonsUpEvent(comboStrings: self.comboButtonStrings)
}
}
default:
+2 -2
View File
@@ -2,8 +2,8 @@
// NativeTouchHandler.h
// Moonlight
//
// Created by ZWM on 2024/6/16.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/6/16.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
+2 -2
View File
@@ -2,8 +2,8 @@
// NativeTouchHandler.m
// Moonlight
//
// Created by ZWM on 2024/8/29.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/8/29.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
#import <Foundation/Foundation.h>
+2 -3
View File
@@ -2,9 +2,8 @@
// RelativeTouchHandler.m
// Moonlight
//
// Completely refactored by ZWM on 2024.9.13
// Created by Cameron Gutman on 11/1/20.
// Copyright © 2020 Moonlight Game Streaming Project. All rights reserved.
// Completely refactored by True砖家 on 2024.9.13
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
#import "RelativeTouchHandler.h"
+2 -2
View File
@@ -2,8 +2,8 @@
// LocalizationHelper.h
// Moonlight
//
// Created by ZWM on 2024/6/30.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/6/30.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
#ifndef LocalizationHelper_h
@@ -2,8 +2,8 @@
// SwiftLocalizationHelper.swift
// Moonlight-ZWM
//
// Created by ZWM on 2024/7/23.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/7/23.
// Copyright © True砖家 on Bilibili. All rights reserved.
//
import Foundation
+2 -2
View File
@@ -2,8 +2,8 @@
// OrientationHelper.swift
// Moonlight-ZWM
//
// Created by ZWM on 2024/7/12.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/7/12.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
@@ -2,8 +2,8 @@
// KeyManagerViewController.swift
// Moonlight-ZWM
//
// Created by ZWM on 2024/7/23.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/7/23.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
import UIKit
@@ -2,8 +2,8 @@
// CustomEdgeSlideGestureRecognizer.h
// Moonlight-ZWM
//
// Created by ZWM on 2024/4/30.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/4/30.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
#ifndef CustomEdgeSlideGestureRecognizer_h
@@ -2,8 +2,8 @@
// CustomEdgeSlideGestureRecognizer.m
// Moonlight-ZWM
//
// Created by ZWM on 2024/4/30.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
// Created by True砖家 on 2024/4/30.
// Copyright © 2024 True砖家 on Bilibili. All rights reserved.
//
// #import <Foundation/Foundation.h>