aboutsummaryrefslogtreecommitdiff
path: root/backends
diff options
context:
space:
mode:
authorJozef Legény2018-09-05 06:41:01 +0200
committerDavid Turner2018-10-18 19:48:00 +0100
commitb705262b098c9464d67b5e3f0a40c3eb371ea9e4 (patch)
tree866348e3738a7e9b1f8ba10bf856afc8ca293609 /backends
parent15306581ab27c0ea9605b7d3909262b70226954c (diff)
downloadscummvm-rg350-b705262b098c9464d67b5e3f0a40c3eb371ea9e4.tar.gz
scummvm-rg350-b705262b098c9464d67b5e3f0a40c3eb371ea9e4.tar.bz2
scummvm-rg350-b705262b098c9464d67b5e3f0a40c3eb371ea9e4.zip
IOS: Hide keyboard when rotating to landscape
On iOS12 at least, the rotation did not force the keyboard to hide. This fix will force it to be retracted in landscape and restored when rotating back to the portrait position.
Diffstat (limited to 'backends')
-rw-r--r--backends/platform/ios7/ios7_video.mm7
1 files changed, 7 insertions, 0 deletions
diff --git a/backends/platform/ios7/ios7_video.mm b/backends/platform/ios7/ios7_video.mm
index ee558a16c1..7ce19f1f4b 100644
--- a/backends/platform/ios7/ios7_video.mm
+++ b/backends/platform/ios7/ios7_video.mm
@@ -870,6 +870,13 @@ 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) {
+ [_keyboardView hideKeyboard];
+ } else {
+ [_keyboardView showKeyboard];
+ }
}
- (UITouch *)secondTouchOtherTouchThan:(UITouch *)touch in:(NSSet *)set {