XInput Rumble
This commit is contained in:
@@ -19,8 +19,11 @@ namespace TLAC::Components
|
||||
{
|
||||
const std::string KEY_CONFIG_FILE_NAME = "keyconfig.ini";
|
||||
|
||||
TouchSliderEmulator* TouchSliderEmulator::LatestInstance;
|
||||
|
||||
TouchSliderEmulator::TouchSliderEmulator()
|
||||
{
|
||||
LatestInstance = this;
|
||||
}
|
||||
|
||||
TouchSliderEmulator::~TouchSliderEmulator()
|
||||
|
||||
@@ -17,6 +17,8 @@ namespace TLAC::Components
|
||||
class TouchSliderEmulator : public EmulatorComponent
|
||||
{
|
||||
public:
|
||||
static TouchSliderEmulator* LatestInstance;
|
||||
|
||||
Input::Binding* LeftSideSlideLeft;
|
||||
Input::Binding* LeftSideSlideRight;
|
||||
|
||||
@@ -34,6 +36,14 @@ namespace TLAC::Components
|
||||
|
||||
virtual void OnFocusLost() override;
|
||||
|
||||
bool isSliderTouched()
|
||||
{
|
||||
for (int i = 0; i < 32; i++)
|
||||
if (sliderState->SensorTouched[i].IsTouched) return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
private:
|
||||
ComponentsManager* componentsManager;
|
||||
float sliderSpeed = 750.0f;
|
||||
|
||||
Reference in New Issue
Block a user