From 66655aae856f96437184e058a52b1b4a9e1b24a2 Mon Sep 17 00:00:00 2001 From: rdb Date: Mon, 21 Jan 2019 15:31:54 +0100 Subject: [PATCH] device: fix incorrect features when printing InputDevice --- panda/src/device/inputDevice.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/panda/src/device/inputDevice.cxx b/panda/src/device/inputDevice.cxx index 130854834e..cce2f975b4 100644 --- a/panda/src/device/inputDevice.cxx +++ b/panda/src/device/inputDevice.cxx @@ -404,19 +404,19 @@ output(std::ostream &out) const { << (_axes.size() != 1 ? 'e' : 'i') << 's'; } - if (_features & (unsigned int)Feature::pointer) { + if (_features & (1 << (unsigned int)Feature::pointer)) { out << ", pointer"; } - if (_features & (unsigned int)Feature::keyboard) { + if (_features & (1 << (unsigned int)Feature::keyboard)) { out << ", keyboard"; } - if (_features & (unsigned int)Feature::tracker) { + if (_features & (1 << (unsigned int)Feature::tracker)) { out << ", tracker"; } - if (_features & (unsigned int)Feature::vibration) { + if (_features & (1 << (unsigned int)Feature::vibration)) { out << ", vibration"; } - if (_features & (unsigned int)Feature::battery) { + if (_features & (1 << (unsigned int)Feature::battery)) { out << ", battery"; if (_battery_data.level > 0 && _battery_data.max_level > 0) {