summaryrefslogtreecommitdiffhomepage
path: root/proto-mouse
diff options
context:
space:
mode:
Diffstat (limited to 'proto-mouse')
-rw-r--r--proto-mouse/ftnoir_protocol_mouse.cpp12
-rw-r--r--proto-mouse/ftnoir_protocol_mouse.h6
2 files changed, 9 insertions, 9 deletions
diff --git a/proto-mouse/ftnoir_protocol_mouse.cpp b/proto-mouse/ftnoir_protocol_mouse.cpp
index fb88fe92..85b8cf1d 100644
--- a/proto-mouse/ftnoir_protocol_mouse.cpp
+++ b/proto-mouse/ftnoir_protocol_mouse.cpp
@@ -14,7 +14,7 @@
# define MOUSEEVENTF_MOVE_NOCOALESCE 0x2000
#endif
-void FTNoIR_Protocol::pose(const double *headpose)
+void mouse::pose(const double *headpose)
{
const int axis_x = s.Mouse_X - 1;
const int axis_y = s.Mouse_Y - 1;
@@ -59,12 +59,12 @@ void FTNoIR_Protocol::pose(const double *headpose)
last_y = mouse_y;
}
-QString FTNoIR_Protocol::game_name()
+QString mouse::game_name()
{
return "Mouse tracker";
}
-double FTNoIR_Protocol::get_rotation(double val, double last_pos)
+double mouse::get_rotation(double val, double last_pos)
{
using std::fmod;
using std::fabs;
@@ -81,7 +81,7 @@ double FTNoIR_Protocol::get_rotation(double val, double last_pos)
return x_1;
}
-int FTNoIR_Protocol::get_value(double val, double& last_pos, int& last_px, bool is_rotation, double sensitivity)
+int mouse::get_value(double val, double& last_pos, int& last_px, bool is_rotation, double sensitivity)
{
static constexpr double c = 1e-1;
@@ -103,9 +103,9 @@ int FTNoIR_Protocol::get_value(double val, double& last_pos, int& last_px, bool
return last_px;
}
-bool FTNoIR_Protocol::correct()
+bool mouse::correct()
{
return true;
}
-OPENTRACK_DECLARE_PROTOCOL(FTNoIR_Protocol, MOUSEControls, FTNoIR_ProtocolDll)
+OPENTRACK_DECLARE_PROTOCOL(mouse, MOUSEControls, mouseDll)
diff --git a/proto-mouse/ftnoir_protocol_mouse.h b/proto-mouse/ftnoir_protocol_mouse.h
index f2880822..39209401 100644
--- a/proto-mouse/ftnoir_protocol_mouse.h
+++ b/proto-mouse/ftnoir_protocol_mouse.h
@@ -25,10 +25,10 @@ struct settings : opts {
{}
};
-class FTNoIR_Protocol : public IProtocol
+class mouse : public IProtocol
{
public:
- FTNoIR_Protocol() : last_pos_x(0), last_pos_y(0), last_x(0), last_y(0) {}
+ mouse() : last_pos_x(0), last_pos_y(0), last_x(0), last_y(0) {}
bool correct() override;
void pose( const double *headpose) override;
QString game_name() override;
@@ -57,7 +57,7 @@ private slots:
void doCancel();
};
-class FTNoIR_ProtocolDll : public Metadata
+class mouseDll : public Metadata
{
public:
QString name() { return QString("mouse emulation"); }