libretro: Fix interfacing with paddle sensitivity.

This commit is contained in:
Stephen Anthony 2024-08-29 14:27:28 -02:30
parent bb374fb982
commit 498e8bc4de
1 changed files with 6 additions and 8 deletions

View File

@ -142,18 +142,16 @@ class StellaLIBRETRO
void setPaddleJoypadSensitivity(int sensitivity)
{
if(getLeftControllerType() == Controller::Type::Paddles)
static_cast<Paddles&>(myOSystem->console().leftController()).setDigitalSensitivity(sensitivity);
if(getRightControllerType() == Controller::Type::Paddles)
static_cast<Paddles&>(myOSystem->console().rightController()).setDigitalSensitivity(sensitivity);
if(getLeftControllerType() == Controller::Type::Paddles ||
getRightControllerType() == Controller::Type::Paddles)
Paddles::setDigitalSensitivity(sensitivity);
}
void setPaddleAnalogSensitivity(int sensitivity)
{
if(getLeftControllerType() == Controller::Type::Paddles)
static_cast<Paddles&>(myOSystem->console().leftController()).setAnalogSensitivity(sensitivity);
if(getRightControllerType() == Controller::Type::Paddles)
static_cast<Paddles&>(myOSystem->console().rightController()).setAnalogSensitivity(sensitivity);
if(getLeftControllerType() == Controller::Type::Paddles ||
getRightControllerType() == Controller::Type::Paddles)
Paddles::setAnalogSensitivity(sensitivity);
}
protected: