summaryrefslogtreecommitdiff
path: root/platform/iphone/os_iphone.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'platform/iphone/os_iphone.cpp')
-rw-r--r--platform/iphone/os_iphone.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/platform/iphone/os_iphone.cpp b/platform/iphone/os_iphone.cpp
index f5fce66059..353078c51c 100644
--- a/platform/iphone/os_iphone.cpp
+++ b/platform/iphone/os_iphone.cpp
@@ -64,8 +64,7 @@ const char *OSIPhone::get_video_driver_name(int p_driver) const {
case VIDEO_DRIVER_GLES2:
return "GLES2";
}
- ERR_EXPLAIN("Invalid video driver index " + itos(p_driver));
- ERR_FAIL_V(NULL);
+ ERR_FAIL_V_MSG(NULL, "Invalid video driver index: " + itos(p_driver) + ".");
};
OSIPhone *OSIPhone::get_singleton() {
@@ -471,6 +470,7 @@ extern void _show_keyboard(String p_existing);
extern void _hide_keyboard();
extern Error _shell_open(String p_uri);
extern void _set_keep_screen_on(bool p_enabled);
+extern void _vibrate();
void OSIPhone::show_virtual_keyboard(const String &p_existing_text, const Rect2 &p_screen_rect) {
_show_keyboard(p_existing_text);
@@ -586,6 +586,11 @@ void OSIPhone::native_video_stop() {
_stop_video();
}
+void OSIPhone::vibrate_handheld(int p_duration_ms) {
+ // iOS does not support duration for vibration
+ _vibrate();
+}
+
bool OSIPhone::_check_internal_feature_support(const String &p_feature) {
return p_feature == "mobile";