mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-17 14:11:33 +00:00
Fix bug where L3/R3 touch was passed through to become a mouse click
This commit is contained in:
@@ -627,6 +627,7 @@ static float L3_Y;
|
|||||||
|
|
||||||
- (BOOL)handleTouchUpEvent:touches {
|
- (BOOL)handleTouchUpEvent:touches {
|
||||||
BOOL updated = false;
|
BOOL updated = false;
|
||||||
|
BOOL touched = false;
|
||||||
for (UITouch* touch in touches) {
|
for (UITouch* touch in touches) {
|
||||||
if (touch == _aTouch) {
|
if (touch == _aTouch) {
|
||||||
[_controllerSupport clearButtonFlag:A_FLAG];
|
[_controllerSupport clearButtonFlag:A_FLAG];
|
||||||
@@ -699,11 +700,19 @@ static float L3_Y;
|
|||||||
_rsTouch = nil;
|
_rsTouch = nil;
|
||||||
updated = true;
|
updated = true;
|
||||||
}
|
}
|
||||||
|
else if (touch == _l3Touch) {
|
||||||
|
_l3Touch = nil;
|
||||||
|
touched = true;
|
||||||
|
}
|
||||||
|
else if (touch == _r3Touch) {
|
||||||
|
_r3Touch = nil;
|
||||||
|
touched = true;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
if (updated) {
|
if (updated) {
|
||||||
[_controllerSupport updateFinished];
|
[_controllerSupport updateFinished];
|
||||||
}
|
}
|
||||||
return updated;
|
return updated || touched;
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|||||||
Reference in New Issue
Block a user