Skip to content

Commit

Permalink
libretro: Fix interfacing with paddle sensitivity.
Browse files Browse the repository at this point in the history
  • Loading branch information
sa666666 committed Aug 29, 2024
1 parent bb374fb commit 498e8bc
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/os/libretro/StellaLIBRETRO.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 498e8bc

Please sign in to comment.