diff options
Diffstat (limited to 'platform/ios/display_server_ios.mm')
-rw-r--r-- | platform/ios/display_server_ios.mm | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/platform/ios/display_server_ios.mm b/platform/ios/display_server_ios.mm index e51d43bd89..dcc6ce9218 100644 --- a/platform/ios/display_server_ios.mm +++ b/platform/ios/display_server_ios.mm @@ -45,6 +45,8 @@ #import <sys/utsname.h> +#import <GameController/GameController.h> + static const float kDisplayServerIOSAcceleration = 1.f; DisplayServerIOS *DisplayServerIOS::get_singleton() { @@ -756,6 +758,14 @@ int DisplayServerIOS::virtual_keyboard_get_height() const { return virtual_keyboard_height; } +bool DisplayServerIOS::has_hardware_keyboard() const { + if (@available(iOS 14.0, *)) { + return [GCKeyboard coalescedKeyboard]; + } else { + return false; + } +} + void DisplayServerIOS::clipboard_set(const String &p_text) { [UIPasteboard generalPasteboard].string = [NSString stringWithUTF8String:p_text.utf8()]; } |