Fix minor compile warnings in gcc and clang.

This commit is contained in:
Stephen Anthony 2019-08-11 21:53:06 -02:30
parent 846a117a5e
commit b99c7e1678
3 changed files with 5 additions and 8 deletions

View File

@ -287,7 +287,7 @@ void DialogContainer::handleJoyBtnEvent(int stick, int button, bool pressed)
{
myCurrentButtonDown.stick = stick;
myCurrentButtonDown.button = button;
myButtonRepeatTime = myTime + (activeDialog->repeatEnabled() ? _REPEAT_INITIAL_DELAY : kRepeatNone);
myButtonRepeatTime = myTime + (activeDialog->repeatEnabled() ? _REPEAT_INITIAL_DELAY : _REPEAT_NONE);
activeDialog->handleJoyDown(stick, button);
}
@ -326,7 +326,7 @@ void DialogContainer::handleJoyAxisEvent(int stick, int axis, int value, int but
myCurrentAxisDown.stick = stick;
myCurrentAxisDown.axis = axis;
myCurrentAxisDown.value = value;
myAxisRepeatTime = myTime + (activeDialog->repeatEnabled() ? _REPEAT_INITIAL_DELAY : kRepeatNone);
myAxisRepeatTime = myTime + (activeDialog->repeatEnabled() ? _REPEAT_INITIAL_DELAY : _REPEAT_NONE);
}
activeDialog->handleJoyAxis(stick, axis, value, button);
}
@ -352,7 +352,7 @@ void DialogContainer::handleJoyHatEvent(int stick, int hat, JoyHat value, int bu
myCurrentHatDown.stick = stick;
myCurrentHatDown.hat = hat;
myCurrentHatDown.value = value;
myHatRepeatTime = myTime + (activeDialog->repeatEnabled() ? _REPEAT_INITIAL_DELAY : kRepeatNone);
myHatRepeatTime = myTime + (activeDialog->repeatEnabled() ? _REPEAT_INITIAL_DELAY : _REPEAT_NONE);
}
activeDialog->handleJoyHat(stick, hat, value, button);
}

View File

@ -180,16 +180,13 @@ class DialogContainer
Common::FixedStack<Dialog*> myDialogStack;
private:
enum {
kRepeatNone = 1 << 24 // loooong
};
// Indicates the most current time (in milliseconds) as set by updateTime()
uInt64 myTime;
static uInt64 _DOUBLE_CLICK_DELAY;
static uInt64 _REPEAT_INITIAL_DELAY;
static uInt64 _REPEAT_SUSTAIN_DELAY;
static constexpr uInt64 _REPEAT_NONE = 1 << 24; // loooong
// For continuous 'mouse down' events
struct {

View File

@ -265,7 +265,7 @@ bool EventMappingWidget::handleKeyDown(StellaKey key, StellaMod mod)
{
// Mod keys are only recorded if no other key has been recorded before
if (key < KBDK_LCTRL || key > KBDK_RGUI
|| (!myLastKey || myLastKey >= KBDK_LCTRL && myLastKey <= KBDK_RGUI))
|| (!myLastKey || (myLastKey >= KBDK_LCTRL && myLastKey <= KBDK_RGUI)))
{
myLastKey = key;
}