aboutsummaryrefslogtreecommitdiff
path: root/backends/platform/ios7/ios7_osys_video.mm
diff options
context:
space:
mode:
authorThierry Crozat2019-02-12 23:48:14 +0000
committerThierry Crozat2019-02-16 17:20:57 +0000
commit4795f2b68a4fd7023c2f85a79c1b7686b9226747 (patch)
tree9f107ee21e2b6bb2357249c99729d116dccbc09e /backends/platform/ios7/ios7_osys_video.mm
parent63a6a3c3debce1bc843906bf8fa277a1fb75b2d4 (diff)
downloadscummvm-rg350-4795f2b68a4fd7023c2f85a79c1b7686b9226747.tar.gz
scummvm-rg350-4795f2b68a4fd7023c2f85a79c1b7686b9226747.tar.bz2
scummvm-rg350-4795f2b68a4fd7023c2f85a79c1b7686b9226747.zip
IOS: Implement kFeatureVirtualKeyboard to show/hide the keyboard
Diffstat (limited to 'backends/platform/ios7/ios7_osys_video.mm')
-rw-r--r--backends/platform/ios7/ios7_osys_video.mm20
1 files changed, 20 insertions, 0 deletions
diff --git a/backends/platform/ios7/ios7_osys_video.mm b/backends/platform/ios7/ios7_osys_video.mm
index 3196f88822..20cf687709 100644
--- a/backends/platform/ios7/ios7_osys_video.mm
+++ b/backends/platform/ios7/ios7_osys_video.mm
@@ -583,3 +583,23 @@ void OSystem_iOS7::updateMouseTexture() {
[[iOS7AppDelegate iPhoneView] updateMouseCursor];
});
}
+
+void OSystem_iOS7::setShowKeyboard(bool show) {
+ if (show) {
+ execute_on_main_thread(^ {
+ [[iOS7AppDelegate iPhoneView] showKeyboard];
+ });
+ } else {
+ // Do not hide the keyboard in portrait mode as it is shown automatically and not
+ // just when asked with the kFeatureVirtualKeyboard.
+ if (_screenOrientation == kScreenOrientationLandscape || _screenOrientation == kScreenOrientationFlippedLandscape) {
+ execute_on_main_thread(^ {
+ [[iOS7AppDelegate iPhoneView] hideKeyboard];
+ });
+ }
+ }
+}
+
+bool OSystem_iOS7::isKeyboardShown() const {
+ return [[iOS7AppDelegate iPhoneView] isKeyboardShown];
+}