fix button injection

This commit is contained in:
marios8543 2025-05-13 02:08:40 +03:00
parent 4e265958eb
commit 94f5f5a382
2 changed files with 8 additions and 2 deletions

View File

@ -169,7 +169,7 @@ void InputService::sendButtonPress(aasdk::proto::enums::ButtonCode::Enum buttonC
if(buttonCode == aasdk::proto::enums::ButtonCode::SCROLL_WHEEL)
{
onButtonEvent({projection::ButtonEventType::NONE, wheelDirection, buttonCode});
OPENAUTO_LOG(info) << "[InputService] SENDING WHEEL ";
}
else
{

View File

@ -266,7 +266,13 @@ void ServiceFactory::sendButtonPressFromString(const std::string& btn, const int
{
aasdk::proto::enums::ButtonCode::Enum buttonCode;
projection::WheelDirection wheelDirection = projection::WheelDirection::NONE;
projection::ButtonEventType buttonEventType = state == 0 ? projection::ButtonEventType::PRESS : projection::ButtonEventType::RELEASE;
projection::ButtonEventType buttonEventType = buttonEventType;
if (state == 2) {
buttonEventType = projection::ButtonEventType::NONE;
}
else {
buttonEventType = state == 0 ? projection::ButtonEventType::PRESS : projection::ButtonEventType::RELEASE;
}
if (btn == "ENTER") {
buttonCode = aasdk::proto::enums::ButtonCode::ENTER;