Skip to content
Permalink
Browse files

Make touchpad input's IsDetectable() return false.

Fix "error: class template argument deduction failed" on Debian and Ubuntu buildbots.
  • Loading branch information...
rlnilsen committed Sep 10, 2019
1 parent be3598f commit 927cbe91f6d0f7a3c05fa84efcc3d862d5775f77
Showing with 44 additions and 34 deletions.
  1. +44 −34 Source/Core/InputCommon/ControllerInterface/CemuHookUDPServer/CemuHookUDPServer.cpp
@@ -62,6 +62,16 @@ class Device : public Core::Device
const ControlState m_offset;
};

class TouchInput : public AnalogInput<int>
{
public:
TouchInput(std::string name, const int& input, ControlState range)
: AnalogInput(std::move(name), input, range)
{
}
bool IsDetectable() override { return false; }
};

class AccelerometerInput : public AnalogInput<double>
{
public:
@@ -285,40 +295,40 @@ Device::Device(Proto::DsModel model, int index)
{
m_socket.setBlocking(false);

AddInput(new AnalogInput("Pad W", m_pad_data.button_dpad_left_analog, 255));
AddInput(new AnalogInput("Pad S", m_pad_data.button_dpad_down_analog, 255));
AddInput(new AnalogInput("Pad E", m_pad_data.button_dpad_right_analog, 255));
AddInput(new AnalogInput("Pad N", m_pad_data.button_dpad_up_analog, 255));
AddInput(new AnalogInput("Square", m_pad_data.button_square_analog, 255));
AddInput(new AnalogInput("Cross", m_pad_data.button_cross_analog, 255));
AddInput(new AnalogInput("Circle", m_pad_data.button_circle_analog, 255));
AddInput(new AnalogInput("Triangle", m_pad_data.button_triangle_analog, 255));
AddInput(new AnalogInput("L1", m_pad_data.button_l1_analog, 255));
AddInput(new AnalogInput("R1", m_pad_data.button_r1_analog, 255));

AddInput(new AnalogInput("L2", m_pad_data.trigger_l2, 255));
AddInput(new AnalogInput("R2", m_pad_data.trigger_r2, 255));

AddInput(new Button("L3", m_pad_data.button_states1, 0x2));
AddInput(new Button("R3", m_pad_data.button_states1, 0x4));
AddInput(new Button("Share", m_pad_data.button_states1, 0x1));
AddInput(new Button("Options", m_pad_data.button_states1, 0x8));
AddInput(new Button("PS", m_pad_data.button_ps, 0x1));
AddInput(new Button("Touch Button", m_pad_data.button_touch, 0x1));

AddInput(new AnalogInput("Left X-", m_pad_data.left_stick_x, -128, -128));
AddInput(new AnalogInput("Left X+", m_pad_data.left_stick_x, 127, -128));
AddInput(new AnalogInput("Left Y-", m_pad_data.left_stick_y_inverted, -128, -128));
AddInput(new AnalogInput("Left Y+", m_pad_data.left_stick_y_inverted, 127, -128));
AddInput(new AnalogInput("Right X-", m_pad_data.right_stick_x, -128, -128));
AddInput(new AnalogInput("Right X+", m_pad_data.right_stick_x, 127, -128));
AddInput(new AnalogInput("Right Y-", m_pad_data.right_stick_y_inverted, -128, -128));
AddInput(new AnalogInput("Right Y+", m_pad_data.right_stick_y_inverted, 127, -128));

AddInput(new AnalogInput("Touch X-", m_touch_x, -TOUCH_X_AXIS_MAX));
AddInput(new AnalogInput("Touch X+", m_touch_x, TOUCH_X_AXIS_MAX));
AddInput(new AnalogInput("Touch Y-", m_touch_y, -TOUCH_Y_AXIS_MAX));
AddInput(new AnalogInput("Touch Y+", m_touch_y, TOUCH_Y_AXIS_MAX));
AddInput(new AnalogInput<u8>("Pad W", m_pad_data.button_dpad_left_analog, 255));
AddInput(new AnalogInput<u8>("Pad S", m_pad_data.button_dpad_down_analog, 255));
AddInput(new AnalogInput<u8>("Pad E", m_pad_data.button_dpad_right_analog, 255));
AddInput(new AnalogInput<u8>("Pad N", m_pad_data.button_dpad_up_analog, 255));
AddInput(new AnalogInput<u8>("Square", m_pad_data.button_square_analog, 255));
AddInput(new AnalogInput<u8>("Cross", m_pad_data.button_cross_analog, 255));
AddInput(new AnalogInput<u8>("Circle", m_pad_data.button_circle_analog, 255));
AddInput(new AnalogInput<u8>("Triangle", m_pad_data.button_triangle_analog, 255));
AddInput(new AnalogInput<u8>("L1", m_pad_data.button_l1_analog, 255));
AddInput(new AnalogInput<u8>("R1", m_pad_data.button_r1_analog, 255));

AddInput(new AnalogInput<u8>("L2", m_pad_data.trigger_l2, 255));
AddInput(new AnalogInput<u8>("R2", m_pad_data.trigger_r2, 255));

AddInput(new Button<u8>("L3", m_pad_data.button_states1, 0x2));
AddInput(new Button<u8>("R3", m_pad_data.button_states1, 0x4));
AddInput(new Button<u8>("Share", m_pad_data.button_states1, 0x1));
AddInput(new Button<u8>("Options", m_pad_data.button_states1, 0x8));
AddInput(new Button<u8>("PS", m_pad_data.button_ps, 0x1));
AddInput(new Button<u8>("Touch Button", m_pad_data.button_touch, 0x1));

AddInput(new AnalogInput<u8>("Left X-", m_pad_data.left_stick_x, -128, -128));
AddInput(new AnalogInput<u8>("Left X+", m_pad_data.left_stick_x, 127, -128));
AddInput(new AnalogInput<u8>("Left Y-", m_pad_data.left_stick_y_inverted, -128, -128));
AddInput(new AnalogInput<u8>("Left Y+", m_pad_data.left_stick_y_inverted, 127, -128));
AddInput(new AnalogInput<u8>("Right X-", m_pad_data.right_stick_x, -128, -128));
AddInput(new AnalogInput<u8>("Right X+", m_pad_data.right_stick_x, 127, -128));
AddInput(new AnalogInput<u8>("Right Y-", m_pad_data.right_stick_y_inverted, -128, -128));
AddInput(new AnalogInput<u8>("Right Y+", m_pad_data.right_stick_y_inverted, 127, -128));

AddInput(new TouchInput("Touch X-", m_touch_x, -TOUCH_X_AXIS_MAX));
AddInput(new TouchInput("Touch X+", m_touch_x, TOUCH_X_AXIS_MAX));
AddInput(new TouchInput("Touch Y-", m_touch_y, -TOUCH_Y_AXIS_MAX));
AddInput(new TouchInput("Touch Y+", m_touch_y, TOUCH_Y_AXIS_MAX));

AddInput(new AccelerometerInput("Accelerometer Left", m_accel.x, 1));
AddInput(new AccelerometerInput("Accelerometer Right", m_accel.x, -1));

0 comments on commit 927cbe9

Please sign in to comment.
You can’t perform that action at this time.