Add a custom gesture recognizer to trigger session disconnection when user swipe with a horizontal distance that exceeds half screen width, this works better in native-touch passthrough.

Original ios-moonlight triggers session disconnection with a short swipe from left edge, which happens frequently & unexpectedly in an intense native-touch passthrough gaming condition (like GenshinImpact).
This commit is contained in:
ZWM committed 2024-04-30 23:41:58 +08:00
1 parent fd8cc416ab
commit 616238e847
3 files changed
+85 -4

No files matched your search

@@ -0,0 +1,17 @@
//
// CustomEdgeSwipeGestureRecognizer.h
// Moonlight-ZWM
//
// Created by ZWM on 2024/4/30.
// Copyright © 2024 Moonlight Game Streaming Project. All rights reserved.
//
#ifndef CustomEdgeSwipeGestureRecognizer_h
#define CustomEdgeSwipeGestureRecognizer_h
// CustomEdgeSwipeGestureRecognizer.h
#import <UIKit/UIKit.h>
@interface CustomEdgeSwipeGestureRecognizer : UIGestureRecognizer
@end
#endif /* CustomEdgeSwipeGestureRecognizer_h */