mirror of https://github.com/stella-emu/stella.git
Fix some minor warnings from Clang.
This commit is contained in:
parent
193e8a1a46
commit
b6717a4b9a
|
@ -400,7 +400,8 @@ void Paddles::setAnalogYCenter(int ycenter)
|
||||||
float Paddles::setAnalogSensitivity(int sensitivity)
|
float Paddles::setAnalogSensitivity(int sensitivity)
|
||||||
{
|
{
|
||||||
// BASE_ANALOG_SENSE * (1.1 ^ 20) = 1.0
|
// 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;
|
return SENSITIVITY;
|
||||||
}
|
}
|
||||||
|
|
|
@ -48,7 +48,7 @@ class Paddles : public Controller
|
||||||
virtual ~Paddles() = default;
|
virtual ~Paddles() = default;
|
||||||
|
|
||||||
public:
|
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 MAX_ANALOG_SENSE = 30;
|
||||||
static constexpr int MIN_ANALOG_CENTER = -10;
|
static constexpr int MIN_ANALOG_CENTER = -10;
|
||||||
static constexpr int MAX_ANALOG_CENTER = 30;
|
static constexpr int MAX_ANALOG_CENTER = 30;
|
||||||
|
@ -95,14 +95,14 @@ class Paddles : public Controller
|
||||||
/**
|
/**
|
||||||
Sets the x-center for analog paddles.
|
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);
|
static void setAnalogXCenter(int xcenter);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the y-center for analog paddles.
|
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);
|
static void setAnalogYCenter(int ycenter);
|
||||||
|
|
||||||
|
|
|
@ -229,8 +229,7 @@ void InputDialog::addDevicePortTab()
|
||||||
void InputDialog::addMouseTab()
|
void InputDialog::addMouseTab()
|
||||||
{
|
{
|
||||||
const int lineHeight = _font.getLineHeight(),
|
const int lineHeight = _font.getLineHeight(),
|
||||||
fontWidth = _font.getMaxCharWidth(),
|
fontWidth = _font.getMaxCharWidth();
|
||||||
fontHeight = _font.getFontHeight();
|
|
||||||
int ypos, lwidth, pwidth, tabID;
|
int ypos, lwidth, pwidth, tabID;
|
||||||
WidgetArray wid;
|
WidgetArray wid;
|
||||||
VariantList items;
|
VariantList items;
|
||||||
|
@ -607,7 +606,7 @@ void InputDialog::handleCommand(CommandSender* sender, int cmd,
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kPSpeedChanged:
|
case kPSpeedChanged:
|
||||||
myPaddleSpeed->setValueLabel(Paddles::setAnalogSensitivity(myPaddleSpeed->getValue()) * 100.0 + 0.5);
|
myPaddleSpeed->setValueLabel(Paddles::setAnalogSensitivity(myPaddleSpeed->getValue()) * 100.F + 0.5F);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case kDejitterAvChanged:
|
case kDejitterAvChanged:
|
||||||
|
|
Loading…
Reference in New Issue