diff options
author | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-19 13:39:50 +0200 |
---|---|---|
committer | Stanislaw Halik <sthalik@misaki.pl> | 2014-10-19 13:39:50 +0200 |
commit | a8ffbb76f3e3bbca547fccf5135323e06cae9d2a (patch) | |
tree | cd77a5302cb4ead5995a2a86d5b5b6324ebf43ff /ftnoir_protocol_vjoy | |
parent | 0f0d663c6263a59e2cb14f555a00b39b19c134e7 (diff) |
update modules to refactored API
Diffstat (limited to 'ftnoir_protocol_vjoy')
-rw-r--r-- | ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp | 2 | ||||
-rw-r--r-- | ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h | 22 | ||||
-rw-r--r-- | ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp | 8 |
3 files changed, 9 insertions, 23 deletions
diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp index 58fa2ab1..c29eb11e 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.cpp @@ -12,7 +12,7 @@ FTNoIR_Protocol::~FTNoIR_Protocol() VJoy_Shutdown(); } -void FTNoIR_Protocol::sendHeadposeToGame( const double *headpose ) { +void FTNoIR_Protocol::pose( const double *headpose ) { #pragma GCC diagnostic ignored "-Wmissing-field-initializers" JOYSTICK_STATE state[2] = { 0 }; diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h index eac3c610..e9a6e704 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy.h @@ -37,25 +37,25 @@ class FTNoIR_Protocol : public IProtocol public: FTNoIR_Protocol(); ~FTNoIR_Protocol() override; - bool checkServerInstallationOK() { + bool correct() { return true; } - void sendHeadposeToGame( const double *headpose ); - QString getGameName() { + void pose( const double *headpose ); + QString game_name() { return "Virtual joystick"; } private: }; // Widget that has controls for FTNoIR protocol client-settings. -class VJoyControls: public QWidget, public IProtocolDialog +class VJoyControls: public IProtocolDialog { Q_OBJECT public: explicit VJoyControls(); - void registerProtocol(IProtocol *) {} - void unRegisterProtocol() {} + void register_protocol(IProtocol *) {} + void unregister_protocol() {} private: Ui::UICVJoyControls ui; @@ -69,14 +69,8 @@ private slots: class FTNoIR_ProtocolDll : public Metadata { public: - FTNoIR_ProtocolDll(); - ~FTNoIR_ProtocolDll(); - - void getFullName(QString *strToBeFilled) { *strToBeFilled = QString("VJoy"); } - void getShortName(QString *strToBeFilled) { *strToBeFilled = QString("VJoy"); } - void getDescription(QString *strToBeFilled) { *strToBeFilled = QString("VJoy"); } - - void getIcon(QIcon *icon) { *icon = QIcon(":/images/vjoy.png"); } + QString name() { return QString("Joystick emulation -- VJoy"); } + QIcon icon() { return QIcon(":/images/vjoy.png"); } }; #define VJOY_AXIS_MIN -32768 diff --git a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp index 367a0df6..cdfdc361 100644 --- a/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp +++ b/ftnoir_protocol_vjoy/ftnoir_protocol_vjoy_dll.cpp @@ -2,14 +2,6 @@ #include <QDebug> #include "facetracknoir/plugin-support.h" -FTNoIR_ProtocolDll::FTNoIR_ProtocolDll() { -} - -FTNoIR_ProtocolDll::~FTNoIR_ProtocolDll() -{ - -} - extern "C" OPENTRACK_EXPORT Metadata* GetMetadata() { return new FTNoIR_ProtocolDll; |