diff --git a/src/core/generic/device.hpp b/src/core/generic/device.hpp index 7374a36..90b388f 100644 --- a/src/core/generic/device.hpp +++ b/src/core/generic/device.hpp @@ -20,6 +20,16 @@ struct DeviceInfo { u16 product = 0; ipts::Device::Type type {}; std::optional meta = std::nullopt; + + [[nodiscard]] bool is_touchscreen() const + { + return this->type == ipts::Device::Type::Touchscreen; + } + + [[nodiscard]] bool is_touchpad() const + { + return this->type == ipts::Device::Type::Touchpad; + } }; } // namespace iptsd::core