mirror of
https://github.com/RPCS3/rpcs3.git
synced 2025-07-16 11:48:36 +12:00
Qt/Input: implement blacklist to Filter Noise in pad dialog
This commit is contained in:
parent
c04c23f33d
commit
853c3f9e39
12 changed files with 263 additions and 158 deletions
|
@ -107,7 +107,7 @@ public:
|
|||
std::vector<std::string> ListDevices() override;
|
||||
bool bindPadToDevice(std::shared_ptr<Pad> pad, const std::string& device) override;
|
||||
void ThreadProc() override;
|
||||
void GetNextButtonPress(const std::string& padId, const std::function<void(u16, std::string, int[])>& callback) override;
|
||||
void GetNextButtonPress(const std::string& padId, const std::function<void(u16, std::string, int[])>& callback, bool get_blacklist = false) override;
|
||||
void TestVibration(const std::string& padId, u32 largeMotor, u32 smallMotor) override;
|
||||
|
||||
private:
|
||||
|
@ -117,6 +117,7 @@ private:
|
|||
typedef DWORD (WINAPI * PFN_XINPUTGETBATTERYINFORMATION)(DWORD, BYTE, XINPUT_BATTERY_INFORMATION *);
|
||||
|
||||
private:
|
||||
int GetDeviceNumber(const std::string& padId);
|
||||
std::array<u16, XInputKeyCodes::KeyCodeCount> GetButtonValues(const XINPUT_STATE& state);
|
||||
void TranslateButtonPress(u64 keyCode, bool& pressed, u16& val, bool ignore_threshold = false) override;
|
||||
|
||||
|
@ -127,6 +128,7 @@ private:
|
|||
PFN_XINPUTENABLE xinputEnable;
|
||||
PFN_XINPUTGETBATTERYINFORMATION xinputGetBatteryInformation;
|
||||
|
||||
std::vector<u32> blacklist;
|
||||
std::vector<std::pair<std::shared_ptr<XInputDevice>, std::shared_ptr<Pad>>> bindings;
|
||||
std::array<bool, 7> last_connection_status = {};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue