summaryrefslogtreecommitdiff
path: root/main/input_default.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'main/input_default.cpp')
-rw-r--r--main/input_default.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/main/input_default.cpp b/main/input_default.cpp
index c8b8062eee..5b4ae7f2cb 100644
--- a/main/input_default.cpp
+++ b/main/input_default.cpp
@@ -200,6 +200,12 @@ Vector3 InputDefault::get_accelerometer() {
return accelerometer;
}
+Vector3 InputDefault::get_magnetometer() {
+
+ _THREAD_SAFE_METHOD_
+ return magnetometer;
+}
+
void InputDefault::parse_input_event(const InputEvent& p_event) {
_THREAD_SAFE_METHOD_
@@ -296,6 +302,14 @@ void InputDefault::set_accelerometer(const Vector3& p_accel) {
}
+void InputDefault::set_magnetometer(const Vector3& p_magnetometer) {
+
+ _THREAD_SAFE_METHOD_
+
+ magnetometer=p_magnetometer;
+
+}
+
void InputDefault::set_main_loop(MainLoop *p_main_loop) {
main_loop=p_main_loop;