mirror of
https://github.com/jtgans/g13gui.git
synced 2025-06-20 00:14:09 -04:00
stick: Fix a logic error I introduced
Late night hacking causes all kinds of silliness. We only want to stop running an action when the key is not pressed now, but was prior pressed. My logic caused it to fire when not pressed and not prior pressed, erroneously, leading to stuck keys.
This commit is contained in:
parent
4d964dd0c0
commit
e97cb2c6c3
@ -97,8 +97,10 @@ void StickZone::test(const ZoneCoord &loc) {
|
||||
bool prior_active = _active;
|
||||
_active = _bounds.contains(loc);
|
||||
|
||||
if ((!_active) && prior_active) {
|
||||
if (!_active) {
|
||||
if (prior_active) {
|
||||
_action->act(false);
|
||||
}
|
||||
} else {
|
||||
_action->act(true);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user