MayaFlux 0.5.0
Digital-First Multimedia Processing Framework
Loading...
Searching...
No Matches

◆ poll_device()

void MayaFlux::Core::TabletBackend::poll_device ( TabletDevice device)
private

Definition at line 710 of file TabletBackend.cpp.

711{
712 const int bytes = hid_read_timeout(device.handle,
713 device.read_buffer.data(), device.read_buffer.size(),
715
716 if (bytes > 0) {
717 unpack_report(device,
718 std::span<const uint8_t>(device.read_buffer.data(),
719 static_cast<size_t>(bytes)));
720 return;
721 }
722
723 if (bytes < 0) {
725 "Tablet read error on {}", device.name);
726 device.active.store(false);
727 }
728}
#define MF_WARN(comp, ctx,...)
void unpack_report(TabletDevice &device, std::span< const uint8_t > report)
@ InputBackend
Input device backend (HID, MIDI, OSC)
@ Core
Core engine, backend, subsystems.
int poll_timeout_ms
Timeout for hid_read_timeout.

References MayaFlux::Core::TabletBackend::TabletDevice::active, MayaFlux::Journal::Core, MayaFlux::Core::TabletBackend::TabletDevice::handle, MayaFlux::Journal::InputBackend, m_config, MF_WARN, MayaFlux::Core::TabletBackend::TabletDevice::name, MayaFlux::Core::TabletBackend::Config::poll_timeout_ms, MayaFlux::Core::TabletBackend::TabletDevice::read_buffer, and unpack_report().

Referenced by poll_thread_func().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: