From 3227fe2ebd367560b06e9542b6f295a18c83ad02 Mon Sep 17 00:00:00 2001 From: fireclawthefox Date: Wed, 10 Aug 2016 14:02:37 +0200 Subject: [PATCH] Fixed and enabled logging for some functions Added missing include uncomment logging in find- and get_control as well as find- and get_button functions --- panda/src/device/inputDevice.I | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/panda/src/device/inputDevice.I b/panda/src/device/inputDevice.I index ab30e9eb49..b09a89c7b1 100644 --- a/panda/src/device/inputDevice.I +++ b/panda/src/device/inputDevice.I @@ -11,6 +11,8 @@ * @date 2015-12-11 */ +#include "config_device.h" + /** * */ @@ -249,8 +251,8 @@ get_button(size_t index) const { if (index >= 0 && index < (int)_buttons.size()) { return _buttons[index]; } else { - /*device_cat.error() - << "Index " << index<< " was not found in the controls list\n";*/ + device_cat.error() + << "Index " << index<< " was not found in the controls list\n"; nassertr(false, ButtonState()); } } @@ -266,8 +268,8 @@ find_button(ButtonHandle handle) const { return _buttons[i]; } } - /*device_cat.error() - << "Axis " << axis << " was not found in the controls list\n";*/ + device_cat.error() + << "Handle " << handle.get_name() << " was not found in the controls list\n"; nassertr(false, ButtonState()); } @@ -335,8 +337,8 @@ get_control(size_t index) const { if (index >= 0 && index < (int)_controls.size()) { return _controls[index]; } else { - /*device_cat.error() - << "Index " << index<< " was not found in the controls list\n";*/ + device_cat.error() + << "Index " << index<< " was not found in the controls list\n"; nassertr(false, AnalogState()); } } @@ -352,8 +354,8 @@ find_control(ControlAxis axis) const { return _controls[i]; } } - /*device_cat.error() - << "Axis " << axis << " was not found in the controls list\n";*/ + device_cat.error() + << "Axis " << axis << " was not found in the controls list\n"; nassertr(false, AnalogState()); }