summaryrefslogtreecommitdiff
path: root/main
diff options
context:
space:
mode:
Diffstat (limited to 'main')
-rw-r--r--main/input_default.cpp4
-rw-r--r--main/input_default.h1
-rw-r--r--main/main.cpp17
3 files changed, 12 insertions, 10 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp
index 5ba98c20e2..60675f1115 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -472,6 +472,10 @@ void InputDefault::stop_joy_vibration(int p_device) {
joy_vibration[p_device] = vibration;
}
+void InputDefault::vibrate_handheld(int p_duration_ms) {
+ OS::get_singleton()->vibrate_handheld(p_duration_ms);
+}
+
void InputDefault::set_gravity(const Vector3 &p_gravity) {
_THREAD_SAFE_METHOD_
diff --git a/main/input_default.h b/main/input_default.h
index 80ee17656c..4fc4ad6506 100644
--- a/main/input_default.h
+++ b/main/input_default.h
@@ -226,6 +226,7 @@ public:
virtual void start_joy_vibration(int p_device, float p_weak_magnitude, float p_strong_magnitude, float p_duration = 0);
virtual void stop_joy_vibration(int p_device);
+ virtual void vibrate_handheld(int p_duration_ms = 500);
void set_main_loop(MainLoop *p_main_loop);
void set_mouse_position(const Point2 &p_posf);
diff --git a/main/main.cpp b/main/main.cpp
index 027273c4f4..582df4e866 100644
--- a/main/main.cpp
+++ b/main/main.cpp
@@ -30,6 +30,7 @@
#include "main.h"
+#include "core/crypto/crypto.h"
#include "core/input_map.h"
#include "core/io/file_access_network.h"
#include "core/io/file_access_pack.h"
@@ -37,8 +38,6 @@
#include "core/io/image_loader.h"
#include "core/io/ip.h"
#include "core/io/resource_loader.h"
-#include "core/io/stream_peer_ssl.h"
-#include "core/io/stream_peer_tcp.h"
#include "core/message_queue.h"
#include "core/os/dir_access.h"
#include "core/os/os.h"
@@ -1741,7 +1740,7 @@ bool Main::start() {
if (!project_manager && !editor) { // game
// Load SSL Certificates from Project Settings (or builtin).
- StreamPeerSSL::load_certs_from_memory(StreamPeerSSL::get_project_cert_array());
+ Crypto::load_default_certificates(GLOBAL_DEF("network/ssl/certificates", ""));
if (game_path != "") {
Node *scene = NULL;
@@ -1793,17 +1792,15 @@ bool Main::start() {
}
if (project_manager || editor) {
- // Load SSL Certificates from Editor Settings (or builtin).
- String certs = EditorSettings::get_singleton()->get_setting("network/ssl/editor_ssl_certificates").operator String();
- if (certs != "")
- StreamPeerSSL::load_certs_from_file(certs);
- else
- StreamPeerSSL::load_certs_from_memory(StreamPeerSSL::get_project_cert_array());
-
// Hide console window if requested (Windows-only).
bool hide_console = EditorSettings::get_singleton()->get_setting("interface/editor/hide_console_window");
OS::get_singleton()->set_console_visible(!hide_console);
}
+
+ if (project_manager || editor) {
+ // Load SSL Certificates from Editor Settings (or builtin)
+ Crypto::load_default_certificates(EditorSettings::get_singleton()->get_setting("network/ssl/editor_ssl_certificates").operator String());
+ }
#endif
}