diff options
author | Jozef Legény | 2018-09-05 06:41:01 +0200 |
---|---|---|
committer | David Turner | 2018-10-18 19:48:00 +0100 |
commit | b705262b098c9464d67b5e3f0a40c3eb371ea9e4 (patch) | |
tree | 866348e3738a7e9b1f8ba10bf856afc8ca293609 /backends | |
parent | 15306581ab27c0ea9605b7d3909262b70226954c (diff) | |
download | scummvm-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.mm | 7 |
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 { |