[Scummvm-git-logs] scummvm master -> bf724a36f69cd096225c54c5bc794009af4cb9bf
bluegr
noreply at scummvm.org
Fri Oct 13 11:46:54 UTC 2023
This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
283fb6760a IOS7: Only allow touches on screen for new touch gestures
a7bf2bf5a7 IOS7: Reset screen size properly when HW keyboard is connected
bf724a36f6 IOS7: Defer system gestures on edges
Commit: 283fb6760aa805041c094ab2bb40c4169e8d1494
https://github.com/scummvm/scummvm/commit/283fb6760aa805041c094ab2bb40c4169e8d1494
Author: Lars Sundström (l.sundstrom at gmail.com)
Date: 2023-10-13T14:46:48+03:00
Commit Message:
IOS7: Only allow touches on screen for new touch gestures
Connected hardware devices such as mice and touchpads also generates
gesture events. If holding down a mouse button that is considered as
a long press gesture, but it's also a mouse button event.
These events are interfering with each others and cancels e.g. long
press gestures.
Make sure the tap and long press gestures only allows to be triggered
by direct touches on screen.
Changed paths:
backends/platform/ios7/ios7_video.mm
diff --git a/backends/platform/ios7/ios7_video.mm b/backends/platform/ios7/ios7_video.mm
index ddc31c18f3a..f857aaf910d 100644
--- a/backends/platform/ios7/ios7_video.mm
+++ b/backends/platform/ios7/ios7_video.mm
@@ -198,18 +198,21 @@ bool iOS7_fetchEvent(InternalEvent *event) {
oneFingerTapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(oneFingerTap:)];
[oneFingerTapGesture setNumberOfTapsRequired:1];
[oneFingerTapGesture setNumberOfTouchesRequired:1];
+ [oneFingerTapGesture setAllowedTouchTypes:@[@(UITouchTypeDirect)]];
[oneFingerTapGesture setDelaysTouchesBegan:NO];
[oneFingerTapGesture setDelaysTouchesEnded:NO];
twoFingerTapGesture = [[UITapGestureRecognizer alloc] initWithTarget:self action:@selector(twoFingerTap:)];
[twoFingerTapGesture setNumberOfTapsRequired:1];
[twoFingerTapGesture setNumberOfTouchesRequired:2];
+ [twoFingerTapGesture setAllowedTouchTypes:@[@(UITouchTypeDirect)]];
[twoFingerTapGesture setDelaysTouchesBegan:NO];
[twoFingerTapGesture setDelaysTouchesEnded:NO];
// Default long press duration is 0.5 seconds which suits us well
UILongPressGestureRecognizer *oneFingerLongPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(oneFingerLongPress:)];
[oneFingerLongPressGesture setNumberOfTouchesRequired:1];
+ [oneFingerLongPressGesture setAllowedTouchTypes:@[@(UITouchTypeDirect)]];
[oneFingerLongPressGesture setDelaysTouchesBegan:NO];
[oneFingerLongPressGesture setDelaysTouchesEnded:NO];
[oneFingerLongPressGesture setCancelsTouchesInView:NO];
@@ -217,6 +220,7 @@ bool iOS7_fetchEvent(InternalEvent *event) {
UILongPressGestureRecognizer *twoFingerLongPressGesture = [[UILongPressGestureRecognizer alloc] initWithTarget:self action:@selector(twoFingerLongPress:)];
[twoFingerLongPressGesture setNumberOfTouchesRequired:2];
+ [twoFingerLongPressGesture setAllowedTouchTypes:@[@(UITouchTypeDirect)]];
[twoFingerLongPressGesture setDelaysTouchesBegan:NO];
[twoFingerLongPressGesture setDelaysTouchesEnded:NO];
[twoFingerLongPressGesture setCancelsTouchesInView:NO];
Commit: a7bf2bf5a7af9f197ed381d97fd02054a04e78c8
https://github.com/scummvm/scummvm/commit/a7bf2bf5a7af9f197ed381d97fd02054a04e78c8
Author: Lars Sundström (l.sundstrom at gmail.com)
Date: 2023-10-13T14:46:48+03:00
Commit Message:
IOS7: Reset screen size properly when HW keyboard is connected
The accessory view can be configured to be shown or not. When it is
configured to be shown the screen size has to be adjusted according
to the height of the accessory view, also in the case when a HW
keyboard is connected.
It was noted that the screen size was not properly restored when
disabling the keyboard input. The screen size was only adjusted when
the keyboard input became enabled. The reason for that was that when
disabling the keyboard input the accessory also became hidden. So
the screen size was not updated.
Make sure to always reset the screen size when the accessory view
is configured to be visible.
Changed paths:
backends/platform/ios7/ios7_keyboard.mm
diff --git a/backends/platform/ios7/ios7_keyboard.mm b/backends/platform/ios7/ios7_keyboard.mm
index 36ceba33bfd..df108adc4ea 100644
--- a/backends/platform/ios7/ios7_keyboard.mm
+++ b/backends/platform/ios7/ios7_keyboard.mm
@@ -417,10 +417,10 @@
// Base the new frame size on the current parent frame size
CGRect newFrame = self.superview.frame;
if ([self hwKeyboardConnected]) {
- if (inputView.inputAccessoryView.hidden) {
- return;
- } else {
+ if (ConfMan.getBool("keyboard_fn_bar")) {
newFrame.size.height += (inputView.inputAccessoryView.frame.size.height) * (didShow ? -1 : 1);
+ } else {
+ return;
}
} else {
newFrame.size.height += (keyboardFrame.size.height) * (didShow ? -1 : 1);
Commit: bf724a36f69cd096225c54c5bc794009af4cb9bf
https://github.com/scummvm/scummvm/commit/bf724a36f69cd096225c54c5bc794009af4cb9bf
Author: Lars Sundström (l.sundstrom at gmail.com)
Date: 2023-10-13T14:46:48+03:00
Commit Message:
IOS7: Defer system gestures on edges
The tap gestures were cancelled due to system gestures taking over
when tapping on the screen edges. This made it hard to click on
verbs in games or buttons in launcher when in "Direct mouse mode".
There is an option to defer the system gestures on selcted edges.
This will make tap gestures to be recognised also on screen edges.
Also it won't interfere with the gesture to close the application
on devices lacking home button.
Changed paths:
backends/platform/ios7/ios7_scummvm_view_controller.mm
diff --git a/backends/platform/ios7/ios7_scummvm_view_controller.mm b/backends/platform/ios7/ios7_scummvm_view_controller.mm
index 576704327b4..eba6a9cbce0 100644
--- a/backends/platform/ios7/ios7_scummvm_view_controller.mm
+++ b/backends/platform/ios7/ios7_scummvm_view_controller.mm
@@ -47,6 +47,11 @@
}
#if TARGET_OS_IOS
+
+- (UIRectEdge)preferredScreenEdgesDeferringSystemGestures {
+ return UIRectEdgeLeft | UIRectEdgeBottom | UIRectEdgeRight;
+}
+
- (UIInterfaceOrientation)interfaceOrientation {
if (@available(iOS 13.0, *)) {
return [[[[self view] window] windowScene] interfaceOrientation];
More information about the Scummvm-git-logs
mailing list