Browse Source

device: fix small typo, fixes 1571 (#1572)

git2323 2 years ago
parent
commit
f9a86bced6
1 changed files with 1 additions and 1 deletions
  1. 1 1
      panda/src/device/inputDeviceNode.cxx

+ 1 - 1
panda/src/device/inputDeviceNode.cxx

@@ -69,7 +69,7 @@ do_transmit_data(DataGraphTraverser *, const DataNodeTransmit &,
       const ButtonEvent &event = bel->get_event(i);
       const ButtonEvent &event = bel->get_event(i);
       if (event._type == ButtonEvent::T_down) {
       if (event._type == ButtonEvent::T_down) {
         _button_states[event._button] = true;
         _button_states[event._button] = true;
-      } else if (event._type == ButtonEvent::T_down) {
+      } else if (event._type == ButtonEvent::T_up) {
         _button_states[event._button] = false;
         _button_states[event._button] = false;
       }
       }
     }
     }