logservice: add support for Pointer event types and config event intents

This commit is contained in:
Torrie Fischer 2023-02-19 18:43:00 +01:00
parent 2ee332914a
commit f9add1f684

View File

@ -48,6 +48,8 @@ LogService::intentName(InputEvent::Intent intent)
return "set-display-length"; return "set-display-length";
case InputEvent::SaveConfigurationRequest: case InputEvent::SaveConfigurationRequest:
return "save-configuration"; return "save-configuration";
case InputEvent::ConfigurationChanged:
return "configuration-changed";
default: default:
return NULL; return NULL;
} }
@ -67,6 +69,10 @@ LogService::eventValue(const InputEvent& evt)
snprintf(s_valueBuf, sizeof(s_valueBuf), "\"%s\"", evt.asString());break; snprintf(s_valueBuf, sizeof(s_valueBuf), "\"%s\"", evt.asString());break;
case InputEvent::Color: case InputEvent::Color:
snprintf(s_valueBuf, sizeof(s_valueBuf), "[%d, %d, %d]", evt.asRGB().r, evt.asRGB().g, evt.asRGB().b);break; snprintf(s_valueBuf, sizeof(s_valueBuf), "[%d, %d, %d]", evt.asRGB().r, evt.asRGB().g, evt.asRGB().b);break;
case InputEvent::Pointer:
snprintf(s_valueBuf, sizeof(s_valueBuf), "*%p", evt.as<void*>());break;
default:
snprintf(s_valueBuf, sizeof(s_valueBuf), "CORRUPTED");break;
} }
return s_valueBuf; return s_valueBuf;
} }