mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 11:51:52 +00:00
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.
This commit is contained in:
parent
15306581ab
commit
b705262b09
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user