From b8e7865a017363e9d3876539936a6f73310a99d9 Mon Sep 17 00:00:00 2001 From: Marc UME Date: Tue, 24 Dec 2019 11:28:42 +0100 Subject: x-plane 11 plugins fixes --- x-plane-plugin/plugin.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/x-plane-plugin/plugin.c b/x-plane-plugin/plugin.c index e988313b..ed72e50e 100644 --- a/x-plane-plugin/plugin.c +++ b/x-plane-plugin/plugin.c @@ -176,12 +176,19 @@ void volatile_explicit_bzero(void volatile* restrict ptr, size_t len) PLUGIN_API OTR_GENERIC_EXPORT int XPluginStart (char* outName, char* outSignature, char* outDescription) { - view_x = XPLMFindDataRef("sim/aircraft/view/acf_peX"); - view_y = XPLMFindDataRef("sim/aircraft/view/acf_peY"); - view_z = XPLMFindDataRef("sim/aircraft/view/acf_peZ"); + // view_x = XPLMFindDataRef("sim/aircraft/view/acf_peX"); + // view_y = XPLMFindDataRef("sim/aircraft/view/acf_peY"); + // view_z = XPLMFindDataRef("sim/aircraft/view/acf_peZ"); + // view_heading = XPLMFindDataRef("sim/graphics/view/pilots_head_psi"); + // view_pitch = XPLMFindDataRef("sim/graphics/view/pilots_head_the"); + // view_roll = XPLMFindDataRef("sim/graphics/view/field_of_view_roll_deg"); + + view_x = XPLMFindDataRef("sim/graphics/view/pilots_head_x"); + view_y = XPLMFindDataRef("sim/graphics/view/pilots_head_y"); + view_z = XPLMFindDataRef("sim/graphics/view/pilots_head_z"); view_heading = XPLMFindDataRef("sim/graphics/view/pilots_head_psi"); view_pitch = XPLMFindDataRef("sim/graphics/view/pilots_head_the"); - view_roll = XPLMFindDataRef("sim/graphics/view/field_of_view_roll_deg"); + view_roll = XPLMFindDataRef("sim/graphics/view/pilots_head_phi"); track_toggle = XPLMCreateCommand("opentrack/toggle", "Disable/Enable head tracking"); translation_disable_toggle = XPLMCreateCommand("opentrack/toggle_translation", "Disable/Enable input translation from opentrack"); -- cgit v1.2.3 From 7b4d9859006ac8de87d70edd18278b3b9dfa065a Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 29 Dec 2019 06:11:51 +0100 Subject: fix std::hash Fixes #1015 --- compat/qhash.hpp | 10 +--------- dinput/win32-joystick.hpp | 1 - options/bundle.hpp | 2 -- options/connector.hpp | 3 +-- options/group.hpp | 1 - 5 files changed, 2 insertions(+), 15 deletions(-) diff --git a/compat/qhash.hpp b/compat/qhash.hpp index c2be4fc5..e38ee056 100644 --- a/compat/qhash.hpp +++ b/compat/qhash.hpp @@ -1,14 +1,6 @@ #pragma once +#include #include #include -namespace std { -template<> struct hash -{ - unsigned operator()(const QString& value) const - { - return qHash(value); - } -}; -} diff --git a/dinput/win32-joystick.hpp b/dinput/win32-joystick.hpp index 3aa6f315..82590db6 100644 --- a/dinput/win32-joystick.hpp +++ b/dinput/win32-joystick.hpp @@ -9,7 +9,6 @@ #include "dinput.hpp" #include "compat/timer.hpp" -#include "compat/qhash.hpp" #include "export.hpp" #include diff --git a/options/bundle.hpp b/options/bundle.hpp index d99ef06d..ce859bb1 100644 --- a/options/bundle.hpp +++ b/options/bundle.hpp @@ -24,8 +24,6 @@ #include -#include "compat/qhash.hpp" - #include "export.hpp" namespace options::detail { diff --git a/options/connector.hpp b/options/connector.hpp index e22cb20f..ffef2a3d 100644 --- a/options/connector.hpp +++ b/options/connector.hpp @@ -13,8 +13,7 @@ #include #include - -#include "compat/qhash.hpp" +#include #include "export.hpp" diff --git a/options/group.hpp b/options/group.hpp index 93299b6e..751eee34 100644 --- a/options/group.hpp +++ b/options/group.hpp @@ -5,7 +5,6 @@ #include "compat/base-path.hpp" #include "compat/library-path.hpp" #include "compat/macros.hpp" -#include "compat/qhash.hpp" #include "export.hpp" #include -- cgit v1.2.3 From c537acf6d7ebff26db9d5981d33d05fe7101baf6 Mon Sep 17 00:00:00 2001 From: Stanislaw Halik Date: Sun, 29 Dec 2019 06:12:21 +0100 Subject: tracker/hatire: fix deprecated QTime api --- tracker-hatire/ftnoir_tracker_hat_dialog.cpp | 4 ++-- tracker-hatire/ftnoir_tracker_hat_dialog.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tracker-hatire/ftnoir_tracker_hat_dialog.cpp b/tracker-hatire/ftnoir_tracker_hat_dialog.cpp index 491d1214..7cb25d18 100644 --- a/tracker-hatire/ftnoir_tracker_hat_dialog.cpp +++ b/tracker-hatire/ftnoir_tracker_hat_dialog.cpp @@ -177,8 +177,8 @@ void dialog_hatire::poll_tracker_info() int frame_cnt; theTracker->get_info(&frame_cnt); - ui.lab_vtps->setText(QString::number(frame_cnt*(1000/last_time.elapsed()))); - last_time.restart(); + ui.lab_vtps->setText(QString::number(frame_cnt*(1000/last_time.elapsed_ms()))); + last_time.start(); } } diff --git a/tracker-hatire/ftnoir_tracker_hat_dialog.h b/tracker-hatire/ftnoir_tracker_hat_dialog.h index 7577445c..c578f22f 100644 --- a/tracker-hatire/ftnoir_tracker_hat_dialog.h +++ b/tracker-hatire/ftnoir_tracker_hat_dialog.h @@ -1,12 +1,12 @@ #pragma once #include "api/plugin-api.hpp" +#include "compat/timer.hpp" #include "ftnoir_tracker_hat_settings.h" #include "ftnoir_tracker_hat.h" #include "ui_ftnoir_hatcontrols.h" #include #include -#include #include #include #include @@ -25,7 +25,7 @@ public: private: Ui::UIHATControls ui; hatire *theTracker; - QTime last_time; + Timer last_time; public slots: void WriteMsgInfo(const QByteArray &MsgInfo); -- cgit v1.2.3