From ba7874b0e706cc196a5c13b2ce300b4cec1b94fe Mon Sep 17 00:00:00 2001 From: Leon Styhre Date: Sun, 14 Jan 2024 22:18:21 +0100 Subject: [PATCH] Fixed an issue where touch input was not logged correctly --- es-core/src/InputConfig.cpp | 4 ++++ es-core/src/InputConfig.h | 8 ++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/es-core/src/InputConfig.cpp b/es-core/src/InputConfig.cpp index 2cbfced0b..8f9e30ca8 100644 --- a/es-core/src/InputConfig.cpp +++ b/es-core/src/InputConfig.cpp @@ -28,6 +28,8 @@ std::string InputConfig::inputTypeToString(InputType type) return "button"; case TYPE_KEY: return "key"; + case TYPE_TOUCH: + return "touch-button"; case TYPE_CEC_BUTTON: return "cec-button"; default: @@ -43,6 +45,8 @@ InputType InputConfig::stringToInputType(const std::string& type) return TYPE_BUTTON; if (type == "key") return TYPE_KEY; + if (type == "touch-button") + return TYPE_TOUCH; if (type == "cec-button") return TYPE_CEC_BUTTON; return TYPE_COUNT; diff --git a/es-core/src/InputConfig.h b/es-core/src/InputConfig.h index 1ad30128d..10899f246 100644 --- a/es-core/src/InputConfig.h +++ b/es-core/src/InputConfig.h @@ -17,8 +17,8 @@ #include #define DEVICE_KEYBOARD -1 -#define DEVICE_TOUCH -2 -#define DEVICE_CEC -3 +#define DEVICE_CEC -2 +#define DEVICE_TOUCH -3 enum InputType { TYPE_AXIS, @@ -83,6 +83,10 @@ public: stream << "Key " << SDL_GetKeyName((SDL_Keycode)id); break; } + case TYPE_TOUCH: { + stream << "Button " << id; + break; + } case TYPE_CEC_BUTTON: { stream << "CEC-Button " << getCECButtonName(id); break;