2020-01-23 11:34:48 +13:00
|
|
|
#pragma once
|
|
|
|
class XInputManager
|
|
|
|
{
|
|
|
|
float* vibration_address_high_frequency = NULL;
|
2021-03-10 07:43:47 +13:00
|
|
|
float vibrationStrengthFactor;
|
2020-01-23 11:34:48 +13:00
|
|
|
float* vibration_address_low_frequency = NULL;
|
|
|
|
DWORD controllerId = -1;
|
|
|
|
std::thread xinputThread;
|
|
|
|
public:
|
2021-03-10 07:43:47 +13:00
|
|
|
XInputManager(uint8_t** base_controller_input_address_ptr, const float vibrationStrengthFactor);
|
2020-02-02 09:03:46 +13:00
|
|
|
void Run(uint8_t** base_controller_input_address_ptr);
|
|
|
|
void WaitAndSetVibrationAddress(uint8_t** base_controller_input_address_ptr);
|
2020-01-23 11:34:48 +13:00
|
|
|
void VibrationLoop();
|
|
|
|
void SetControllerVibration(const WORD& leftMotorVibration, const WORD& rightMotorVibration);
|
|
|
|
};
|
|
|
|
|