[Scummvm-git-logs] scummvm master -> 85b4b188eff52e1cba009a4022196f8131acd162

criezy criezy at scummvm.org
Tue Sep 28 23:24:16 UTC 2021


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
7def254317 JANITORIAL: Fix indentation in iOS7 backend source code
5f1e3f07ca IOS7: Fix using arrow keys from physical keyboard on iOS 15
15e6e34416 NEWS: Grammatical consistency
85b4b188ef IOS7: Fix rotating the device while ScummVM is innactive


Commit: 7def254317e19ca315ab943c456f0eaad5304804
    https://github.com/scummvm/scummvm/commit/7def254317e19ca315ab943c456f0eaad5304804
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-09-28T23:28:54+01:00

Commit Message:
JANITORIAL: Fix indentation in iOS7 backend source code

Changed paths:
    backends/platform/ios7/ios7_scummvm_view_controller.mm
    backends/platform/ios7/ios7_video.mm


diff --git a/backends/platform/ios7/ios7_scummvm_view_controller.mm b/backends/platform/ios7/ios7_scummvm_view_controller.mm
index 92da86f009..2dca55ca91 100644
--- a/backends/platform/ios7/ios7_scummvm_view_controller.mm
+++ b/backends/platform/ios7/ios7_scummvm_view_controller.mm
@@ -26,11 +26,11 @@
 @implementation iOS7ScummVMViewController
 
 - (BOOL)prefersStatusBarHidden {
-    return YES;
+	return YES;
 }
 
 - (BOOL)prefersHomeIndicatorAutoHidden {
-    return YES;
+	return YES;
 }
 
 @end
diff --git a/backends/platform/ios7/ios7_video.mm b/backends/platform/ios7/ios7_video.mm
index 8aa08094f7..989a25368e 100644
--- a/backends/platform/ios7/ios7_video.mm
+++ b/backends/platform/ios7/ios7_video.mm
@@ -698,7 +698,7 @@ uint getSizeNextPOT(uint size) {
 
 	[self setViewTransformation];
 	[self updateMouseCursorScaling];
-    [self adjustViewFrameForSafeArea];
+	[self adjustViewFrameForSafeArea];
 }
 
 #ifndef __has_builtin
@@ -713,23 +713,23 @@ uint getSizeNextPOT(uint size) {
 	// available when running on iOS 11+ if it has been compiled on iOS 11+
 #ifdef __IPHONE_11_0
 #if __has_builtin(__builtin_available)
-    if ( @available(iOS 11,*) ) {
+	if ( @available(iOS 11,*) ) {
 #else
-    if ( [[[UIApplication sharedApplication] keyWindow] respondsToSelector:@selector(safeAreaInsets)] ) {
+	if ( [[[UIApplication sharedApplication] keyWindow] respondsToSelector:@selector(safeAreaInsets)] ) {
 #endif
-        CGRect screenSize = [[UIScreen mainScreen] bounds];
-        UIEdgeInsets inset = [[[UIApplication sharedApplication] keyWindow] safeAreaInsets];
-        UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
-        CGRect newFrame = screenSize;
-        if ( orientation == UIInterfaceOrientationPortrait ) {
-            newFrame = CGRectMake(screenSize.origin.x, screenSize.origin.y + inset.top, screenSize.size.width, screenSize.size.height - inset.top);
-        } else if ( orientation == UIInterfaceOrientationLandscapeLeft ) {
-            newFrame = CGRectMake(screenSize.origin.x, screenSize.origin.y, screenSize.size.width - inset.right, screenSize.size.height);
-        } else if ( orientation == UIInterfaceOrientationLandscapeRight ) {
-            newFrame = CGRectMake(screenSize.origin.x + inset.left, screenSize.origin.y, screenSize.size.width - inset.left, screenSize.size.height);
-        }
-        self.frame = newFrame;
-    }
+		CGRect screenSize = [[UIScreen mainScreen] bounds];
+		UIEdgeInsets inset = [[[UIApplication sharedApplication] keyWindow] safeAreaInsets];
+		UIInterfaceOrientation orientation = [[UIApplication sharedApplication] statusBarOrientation];
+		CGRect newFrame = screenSize;
+		if ( orientation == UIInterfaceOrientationPortrait ) {
+			newFrame = CGRectMake(screenSize.origin.x, screenSize.origin.y + inset.top, screenSize.size.width, screenSize.size.height - inset.top);
+		} else if ( orientation == UIInterfaceOrientationLandscapeLeft ) {
+			newFrame = CGRectMake(screenSize.origin.x, screenSize.origin.y, screenSize.size.width - inset.right, screenSize.size.height);
+		} else if ( orientation == UIInterfaceOrientationLandscapeRight ) {
+			newFrame = CGRectMake(screenSize.origin.x + inset.left, screenSize.origin.y, screenSize.size.width - inset.left, screenSize.size.height);
+		}
+		self.frame = newFrame;
+	}
 #endif
 }
 
@@ -814,12 +814,12 @@ uint getSizeNextPOT(uint size) {
 - (void)deviceOrientationChanged:(UIDeviceOrientation)orientation {
 	[self addEvent:InternalEvent(kInputOrientationChanged, orientation, 0)];
 
-  BOOL isLandscape = (self.bounds.size.width > self.bounds.size.height);
-  if (isLandscape) {
-    [self hideKeyboard];
-  } else {
-    [self showKeyboard];
-  }
+	BOOL isLandscape = (self.bounds.size.width > self.bounds.size.height);
+	if (isLandscape) {
+		[self hideKeyboard];
+	} else {
+		[self showKeyboard];
+	}
 }
 
 - (void)showKeyboard {


Commit: 5f1e3f07ca07f2beb5be1e3b425a989d0297d399
    https://github.com/scummvm/scummvm/commit/5f1e3f07ca07f2beb5be1e3b425a989d0297d399
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-09-29T00:05:58+01:00

Commit Message:
IOS7: Fix using arrow keys from physical keyboard on iOS 15

This fixes part of bug #12942.

Changed paths:
    NEWS.md
    backends/platform/ios7/ios7_keyboard.mm


diff --git a/NEWS.md b/NEWS.md
index 0accaae4de..59e8522a16 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -230,6 +230,9 @@ For a more comprehensive changelog of the latest experimental code, see:
    - Fixed crashes or rendering issues with the Blazing Dragons, Duckman and
      Full Pipe games.
 
+ iOS port:
+   - Fixed using arrow keys on physical keyboard in iOS 15.
+
  macOS port:
    - Add support for Dark Mode.
    - Use OpenGL renderer by default, providing better support for HiDPI displays.
diff --git a/backends/platform/ios7/ios7_keyboard.mm b/backends/platform/ios7/ios7_keyboard.mm
index 46168278af..f7e3798956 100644
--- a/backends/platform/ios7/ios7_keyboard.mm
+++ b/backends/platform/ios7/ios7_keyboard.mm
@@ -146,11 +146,23 @@
 //	[self reloadInputViews];
 }
 
+- (void) setWantsPriority: (UIKeyCommand*) keyCommand {
+	// In iOS 15 the UIKeyCommand has a new property wantsPriorityOverSystemBehavior that is needed to
+	// receive some keys (such as the arrow keys).
+	if ([keyCommand respondsToSelector:@selector(setWantsPriorityOverSystemBehavior:)]) {
+		[UIKeyCommand setValue:[NSNumber numberWithBool: YES] forKey:@"wantsPriorityOverSystemBehavior"];
+	}
+}
+
 - (NSArray *)keyCommands {
 	UIKeyCommand *upArrow = [UIKeyCommand keyCommandWithInput: UIKeyInputUpArrow modifierFlags: 0 action: @selector(upArrow:)];
+	[self setWantsPriority: upArrow];
 	UIKeyCommand *downArrow = [UIKeyCommand keyCommandWithInput: UIKeyInputDownArrow modifierFlags: 0 action: @selector(downArrow:)];
+	[self setWantsPriority: downArrow];
 	UIKeyCommand *leftArrow = [UIKeyCommand keyCommandWithInput: UIKeyInputLeftArrow modifierFlags: 0 action: @selector(leftArrow:)];
+	[self setWantsPriority: leftArrow];
 	UIKeyCommand *rightArrow = [UIKeyCommand keyCommandWithInput: UIKeyInputRightArrow modifierFlags: 0 action: @selector(rightArrow:)];
+	[self setWantsPriority: rightArrow];
 	UIKeyCommand *escapeKey = [UIKeyCommand keyCommandWithInput: UIKeyInputEscape modifierFlags: 0 action: @selector(escapeKey:)];
 	return [[NSArray alloc] initWithObjects: upArrow, downArrow, leftArrow, rightArrow, escapeKey, nil];
 }


Commit: 15e6e34416e1c6d1a0a24e4b70e79ce1d29dad30
    https://github.com/scummvm/scummvm/commit/15e6e34416e1c6d1a0a24e4b70e79ce1d29dad30
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-09-29T00:08:48+01:00

Commit Message:
NEWS: Grammatical consistency

Changed paths:
    NEWS.md


diff --git a/NEWS.md b/NEWS.md
index 59e8522a16..7487ed4cb4 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -220,11 +220,11 @@ For a more comprehensive changelog of the latest experimental code, see:
    - Fixed occasional border corruption during fights.
    - Improvements to cutscenes to better match the original games.
    - Fixes for character selection, deselection, and dismissing to better match original.
-   - Add support for Russian version.
+   - Added support for Russian version.
 
  AmigaOS port:
-   - Add native system file browser feature.
-   - Re-activate nuked OPL Adlib driver.
+   - Added native system file browser feature.
+   - Re-activated nuked OPL Adlib driver.
 
  Big-endian ports:
    - Fixed crashes or rendering issues with the Blazing Dragons, Duckman and
@@ -234,7 +234,7 @@ For a more comprehensive changelog of the latest experimental code, see:
    - Fixed using arrow keys on physical keyboard in iOS 15.
 
  macOS port:
-   - Add support for Dark Mode.
+   - Added support for Dark Mode.
    - Use OpenGL renderer by default, providing better support for HiDPI displays.
 
  MorphOS port:


Commit: 85b4b188eff52e1cba009a4022196f8131acd162
    https://github.com/scummvm/scummvm/commit/85b4b188eff52e1cba009a4022196f8131acd162
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2021-09-29T00:23:31+01:00

Commit Message:
IOS7: Fix rotating the device while ScummVM is innactive

This fixes bug #7137

Changed paths:
    NEWS.md
    backends/platform/ios7/ios7_app_delegate.mm


diff --git a/NEWS.md b/NEWS.md
index 7487ed4cb4..0663ae9fa3 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -232,6 +232,7 @@ For a more comprehensive changelog of the latest experimental code, see:
 
  iOS port:
    - Fixed using arrow keys on physical keyboard in iOS 15.
+   - Fixed rotating the device while ScummVM is innactive.
 
  macOS port:
    - Added support for Dark Mode.
diff --git a/backends/platform/ios7/ios7_app_delegate.mm b/backends/platform/ios7/ios7_app_delegate.mm
index 1330013ffa..86e0d7db49 100644
--- a/backends/platform/ios7/ios7_app_delegate.mm
+++ b/backends/platform/ios7/ios7_app_delegate.mm
@@ -91,6 +91,11 @@
 
 - (void)applicationDidBecomeActive:(UIApplication *)application {
 	[_view applicationResume];
+
+	// Make sure we have the correct orientation in case the orientation was changed while
+	// the app was inactive.
+	UIDeviceOrientation screenOrientation = [[UIDevice currentDevice] orientation];
+	[_view deviceOrientationChanged:screenOrientation];
 }
 
 - (void)applicationDidEnterBackground:(UIApplication *)application {




More information about the Scummvm-git-logs mailing list