diff options
Diffstat (limited to 'proto-mouse')
| -rw-r--r-- | proto-mouse/ftnoir_protocol_mouse.cpp | 4 | ||||
| -rw-r--r-- | proto-mouse/ftnoir_protocol_mouse.h | 6 | ||||
| -rw-r--r-- | proto-mouse/mouse-settings.hpp | 4 | 
3 files changed, 6 insertions, 8 deletions
diff --git a/proto-mouse/ftnoir_protocol_mouse.cpp b/proto-mouse/ftnoir_protocol_mouse.cpp index 9e782384..2bf91a84 100644 --- a/proto-mouse/ftnoir_protocol_mouse.cpp +++ b/proto-mouse/ftnoir_protocol_mouse.cpp @@ -23,7 +23,7 @@ static const double invert[] =      1., -1., 1.  }; -void mouse::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; @@ -82,6 +82,4 @@ int mouse::get_value(double val, double sensitivity, bool is_rotation)      return iround(val * c * sensitivity * sgn[unsigned(is_rotation)]);  } -mouse::mouse() : last_x(0), last_y(0) {} -  OPENTRACK_DECLARE_PROTOCOL(mouse, MOUSEControls, mouseDll) diff --git a/proto-mouse/ftnoir_protocol_mouse.h b/proto-mouse/ftnoir_protocol_mouse.h index 22e78b69..2b88ae1d 100644 --- a/proto-mouse/ftnoir_protocol_mouse.h +++ b/proto-mouse/ftnoir_protocol_mouse.h @@ -21,12 +21,12 @@ class mouse : public TR, public IProtocol      Q_OBJECT  public: -    mouse(); +    mouse() = default;      module_status initialize() override { return status_ok(); } -    void pose( const double *headpose) override; +    void pose(const double* headpose) override;      QString game_name() override; -    int last_x, last_y; +    int last_x = 0, last_y = 0;  private:      static int get_delta(int val, int prev);      static int get_value(double val, double sensitivity, bool is_rotation); diff --git a/proto-mouse/mouse-settings.hpp b/proto-mouse/mouse-settings.hpp index c29024ac..71726588 100644 --- a/proto-mouse/mouse-settings.hpp +++ b/proto-mouse/mouse-settings.hpp @@ -13,8 +13,8 @@ struct mouse_settings : opts {          opts("mouse-proto"),          Mouse_X(b, "mouse-x", 0),          Mouse_Y(b, "mouse-y", 0), -        sensitivity_x(b, "mouse-sensitivity-x", slider_value(200, 25, 500)), -        sensitivity_y(b, "mouse-sensitivity-y", slider_value(200, 25, 500)) +        sensitivity_x(b, "mouse-sensitivity-x", { 200, 25, 500 }), +        sensitivity_y(b, "mouse-sensitivity-y", { 200, 25, 500 })      {}  };  | 
