diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-02-18 17:20:09 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-02-18 17:20:09 +0300 |
commit | 77e0edc68f535b74ba8de261cc666707e6d6c81f (patch) | |
tree | 4fcbf65cced65b01f36bdbc8ee928ad4a5080e9b /src/input | |
parent | 571d6151f0983e488feafb3cd6c9c74bbd038082 (diff) | |
download | manaverse-77e0edc68f535b74ba8de261cc666707e6d6c81f.tar.gz manaverse-77e0edc68f535b74ba8de261cc666707e6d6c81f.tar.bz2 manaverse-77e0edc68f535b74ba8de261cc666707e6d6c81f.tar.xz manaverse-77e0edc68f535b74ba8de261cc666707e6d6c81f.zip |
Add some more debugging in input keys handling.
Diffstat (limited to 'src/input')
-rw-r--r-- | src/input/inputmanager.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/input/inputmanager.cpp b/src/input/inputmanager.cpp index eb6627d2a..a49f7ab49 100644 --- a/src/input/inputmanager.cpp +++ b/src/input/inputmanager.cpp @@ -894,6 +894,10 @@ void InputManager::updateKeyActionMap(KeyToActionMap &restrict actionMap, { actionMap[ki.value].push_back( static_cast<InputActionT>(i)); + logger->log("add key: %d, action: %d, size: %ld", + ki.value, + CAST_S32(i), + static_cast<long>(actionMap[ki.value].size())); } } } @@ -926,7 +930,9 @@ void InputManager::updateKeyActionMap(KeyToActionMap &restrict actionMap, const size_t sz = keys->size(); if (sz > 1) { - logger->log("keys size: %d", CAST_S32(sz)); + logger->log("actions size: key: %d, size: %d", + it->first, + CAST_S32(sz)); int sum = 0; FOR_EACHP (KeysVectorIter, itk, keys) { @@ -937,6 +943,11 @@ void InputManager::updateKeyActionMap(KeyToActionMap &restrict actionMap, static_cast<long>(val)); break; } + else + { + logger->log("action index: %ld", + static_cast<long>(val)); + } sum += inputActionData[val].priority; } logger->log("sum: %d", sum); |