From 498e8bc4defbceb157f43640542783943c94cb69 Mon Sep 17 00:00:00 2001 From: Stephen Anthony Date: Thu, 29 Aug 2024 14:27:28 -0230 Subject: [PATCH] libretro: Fix interfacing with paddle sensitivity. --- src/os/libretro/StellaLIBRETRO.hxx | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/os/libretro/StellaLIBRETRO.hxx b/src/os/libretro/StellaLIBRETRO.hxx index 5dad8195a..9ff6283ab 100644 --- a/src/os/libretro/StellaLIBRETRO.hxx +++ b/src/os/libretro/StellaLIBRETRO.hxx @@ -142,18 +142,16 @@ class StellaLIBRETRO void setPaddleJoypadSensitivity(int sensitivity) { - if(getLeftControllerType() == Controller::Type::Paddles) - static_cast(myOSystem->console().leftController()).setDigitalSensitivity(sensitivity); - if(getRightControllerType() == Controller::Type::Paddles) - static_cast(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(myOSystem->console().leftController()).setAnalogSensitivity(sensitivity); - if(getRightControllerType() == Controller::Type::Paddles) - static_cast(myOSystem->console().rightController()).setAnalogSensitivity(sensitivity); + if(getLeftControllerType() == Controller::Type::Paddles || + getRightControllerType() == Controller::Type::Paddles) + Paddles::setAnalogSensitivity(sensitivity); } protected: