diff options
author | Garrett Brown <themagnificentmrb@gmail.com> | 2024-02-14 12:18:02 -0800 |
---|---|---|
committer | Garrett Brown <themagnificentmrb@gmail.com> | 2024-02-14 16:45:55 -0800 |
commit | 1fe00e470f610c4ae253e3f4e3d653aa4fa0739d (patch) | |
tree | 8e2bae93a1946dafb95b5e0290037fefb83d7e03 | |
parent | 23e0b528386e0585bb1d244a9901ade28a3d42be (diff) |
Revert "[Joysticks] Improve logging while button mapping"
This reverts commit c51595e86d2f830483c5b9e333f3b09c83515544.
-rw-r--r-- | xbmc/games/controllers/windows/GUIConfigurationWizard.cpp | 4 | ||||
-rw-r--r-- | xbmc/input/joysticks/DriverPrimitive.cpp | 70 | ||||
-rw-r--r-- | xbmc/input/joysticks/DriverPrimitive.h | 7 |
3 files changed, 2 insertions, 79 deletions
diff --git a/xbmc/games/controllers/windows/GUIConfigurationWizard.cpp b/xbmc/games/controllers/windows/GUIConfigurationWizard.cpp index ce980cf7c3..e2c7130c58 100644 --- a/xbmc/games/controllers/windows/GUIConfigurationWizard.cpp +++ b/xbmc/games/controllers/windows/GUIConfigurationWizard.cpp @@ -293,8 +293,8 @@ bool CGUIConfigurationWizard::MapPrimitive(JOYSTICK::IButtonMap* buttonMap, } else { - CLog::Log(LOGDEBUG, "{}: mapping feature \"{}\" for device {} to \"{}\"", - m_strControllerId, feature.Name(), buttonMap->Location(), primitive.ToString()); + CLog::Log(LOGDEBUG, "{}: mapping feature \"{}\" for device {}", m_strControllerId, + feature.Name(), buttonMap->Location()); switch (feature.Type()) { diff --git a/xbmc/input/joysticks/DriverPrimitive.cpp b/xbmc/input/joysticks/DriverPrimitive.cpp index 3f1a5ab895..fa8f7c9592 100644 --- a/xbmc/input/joysticks/DriverPrimitive.cpp +++ b/xbmc/input/joysticks/DriverPrimitive.cpp @@ -8,9 +8,6 @@ #include "DriverPrimitive.h" -#include "input/keyboard/KeyboardTranslator.h" -#include "utils/StringUtils.h" - #include <utility> using namespace KODI; @@ -202,70 +199,3 @@ bool CDriverPrimitive::IsValid(void) const return false; } - -std::string CDriverPrimitive::ToString() const -{ - switch (m_type) - { - case PRIMITIVE_TYPE::BUTTON: - return StringUtils::Format("button {}", m_driverIndex); - case PRIMITIVE_TYPE::MOTOR: - return StringUtils::Format("motor {}", m_driverIndex); - case PRIMITIVE_TYPE::MOUSE_BUTTON: - return StringUtils::Format("mouse button {}", m_driverIndex); - case PRIMITIVE_TYPE::HAT: - { - switch (m_hatDirection) - { - case HAT_DIRECTION::UP: - return StringUtils::Format("hat {} up", m_driverIndex); - case HAT_DIRECTION::DOWN: - return StringUtils::Format("hat {} down", m_driverIndex); - case HAT_DIRECTION::RIGHT: - return StringUtils::Format("hat {} right", m_driverIndex); - case HAT_DIRECTION::LEFT: - return StringUtils::Format("hat {} left", m_driverIndex); - default: - break; - } - break; - } - case PRIMITIVE_TYPE::SEMIAXIS: - { - switch (m_semiAxisDirection) - { - case SEMIAXIS_DIRECTION::POSITIVE: - return StringUtils::Format("semiaxis +{}", m_driverIndex); - case SEMIAXIS_DIRECTION::NEGATIVE: - return StringUtils::Format("semiaxis -{}", m_driverIndex); - default: - break; - } - break; - } - case PRIMITIVE_TYPE::KEY: - return StringUtils::Format("key {}", - KEYBOARD::CKeyboardTranslator::TranslateKeycode(m_keycode)); - case PRIMITIVE_TYPE::RELATIVE_POINTER: - { - switch (m_pointerDirection) - { - case RELATIVE_POINTER_DIRECTION::UP: - return StringUtils::Format("pointer {} up", m_driverIndex); - case RELATIVE_POINTER_DIRECTION::DOWN: - return StringUtils::Format("pointer {} down", m_driverIndex); - case RELATIVE_POINTER_DIRECTION::RIGHT: - return StringUtils::Format("pointer {} right", m_driverIndex); - case RELATIVE_POINTER_DIRECTION::LEFT: - return StringUtils::Format("pointer {} left", m_driverIndex); - default: - break; - } - break; - } - default: - break; - } - - return ""; -} diff --git a/xbmc/input/joysticks/DriverPrimitive.h b/xbmc/input/joysticks/DriverPrimitive.h index e4edea9f26..2d8b153fe0 100644 --- a/xbmc/input/joysticks/DriverPrimitive.h +++ b/xbmc/input/joysticks/DriverPrimitive.h @@ -180,13 +180,6 @@ public: */ bool IsValid(void) const; - /*! - * \brief Convert primitive to a string suitable for logging - * - * \return The primitive as described by a short string, or empty if invalid - */ - std::string ToString() const; - private: PRIMITIVE_TYPE m_type = PRIMITIVE_TYPE::UNKNOWN; unsigned int m_driverIndex = 0; |