Qt/Input: Introduce profiles

This commit is contained in:
Unknown 2017-12-23 22:25:51 +01:00 committed by Ivan
parent 4231ea2eb6
commit 51a2b43d81
24 changed files with 1194 additions and 893 deletions

View file

@ -302,11 +302,12 @@ class evdev_joystick_handler final : public PadHandlerBase
struct EvdevDevice
{
libevdev* device = nullptr;
libevdev* device{ nullptr };
pad_config* config{ nullptr };
std::string path;
std::shared_ptr<Pad> pad;
std::unordered_map<int, bool> axis_orientations; // value is true if key was found in rev_axis_list
float stick_val[4] = { 0.0f, 0.0f, 0.0f, 0.0f };
s32 stick_val[4] = { 0, 0, 0, 0 };
u16 val_min[4] = { 0, 0, 0, 0 };
u16 val_max[4] = { 0, 0, 0, 0 };
EvdevButton trigger_left = { 0, 0, 0 };
@ -328,6 +329,7 @@ public:
evdev_joystick_handler();
~evdev_joystick_handler();
void init_config(pad_config* cfg, const std::string& name) override;
bool Init() override;
std::vector<std::string> ListDevices() override;
bool bindPadToDevice(std::shared_ptr<Pad> pad, const std::string& device) override;