mirror of https://github.com/stella-emu/stella.git
Merge branch 'master' of https://github.com/stella-emu/stella
This commit is contained in:
commit
474ba22e5e
|
@ -400,7 +400,8 @@ void Paddles::setAnalogYCenter(int ycenter)
|
|||
float Paddles::setAnalogSensitivity(int sensitivity)
|
||||
{
|
||||
// BASE_ANALOG_SENSE * (1.1 ^ 20) = 1.0
|
||||
SENSITIVITY = BASE_ANALOG_SENSE * std::pow(1.1, BSPF::clamp(sensitivity, 0, MAX_ANALOG_SENSE));
|
||||
SENSITIVITY = BASE_ANALOG_SENSE * std::pow(1.1F,
|
||||
static_cast<float>(BSPF::clamp(sensitivity, 0, MAX_ANALOG_SENSE)));
|
||||
|
||||
return SENSITIVITY;
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ class Paddles : public Controller
|
|||
virtual ~Paddles() = default;
|
||||
|
||||
public:
|
||||
static constexpr float BASE_ANALOG_SENSE = 0.148643628f;
|
||||
static constexpr float BASE_ANALOG_SENSE = 0.148643628F;
|
||||
static constexpr int MAX_ANALOG_SENSE = 30;
|
||||
static constexpr int MIN_ANALOG_CENTER = -10;
|
||||
static constexpr int MAX_ANALOG_CENTER = 30;
|
||||
|
@ -95,14 +95,14 @@ class Paddles : public Controller
|
|||
/**
|
||||
Sets the x-center for analog paddles.
|
||||
|
||||
@param center Value from -10 to 30, representing the center offset/860
|
||||
@param xcenter Value from -10 to 30, representing the center offset/860
|
||||
*/
|
||||
static void setAnalogXCenter(int xcenter);
|
||||
|
||||
/**
|
||||
Sets the y-center for analog paddles.
|
||||
|
||||
@param center Value from -10 to 30, representing the center offset/860
|
||||
@param ycenter Value from -10 to 30, representing the center offset/860
|
||||
*/
|
||||
static void setAnalogYCenter(int ycenter);
|
||||
|
||||
|
|
|
@ -229,8 +229,7 @@ void InputDialog::addDevicePortTab()
|
|||
void InputDialog::addMouseTab()
|
||||
{
|
||||
const int lineHeight = _font.getLineHeight(),
|
||||
fontWidth = _font.getMaxCharWidth(),
|
||||
fontHeight = _font.getFontHeight();
|
||||
fontWidth = _font.getMaxCharWidth();
|
||||
int ypos, lwidth, pwidth, tabID;
|
||||
WidgetArray wid;
|
||||
VariantList items;
|
||||
|
@ -607,7 +606,7 @@ void InputDialog::handleCommand(CommandSender* sender, int cmd,
|
|||
break;
|
||||
|
||||
case kPSpeedChanged:
|
||||
myPaddleSpeed->setValueLabel(Paddles::setAnalogSensitivity(myPaddleSpeed->getValue()) * 100.0 + 0.5);
|
||||
myPaddleSpeed->setValueLabel(Paddles::setAnalogSensitivity(myPaddleSpeed->getValue()) * 100.F + 0.5F);
|
||||
break;
|
||||
|
||||
case kDejitterAvChanged:
|
||||
|
|
Loading…
Reference in New Issue