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

◆ initialize()

bool MayaFlux::Core::TabletBackend::initialize ( )
overridevirtual

Initialize the input backend.

Returns
true if initialization succeeded

Should discover available devices but not start polling/listening.

Implements MayaFlux::Core::IInputBackend.

Definition at line 471 of file TabletBackend.cpp.

472{
473 if (m_initialized.load()) {
474 return true;
475 }
476
477 if (hid_init() != 0) {
479 "Failed to initialize HIDAPI for tablet backend");
480 return false;
481 }
482
483 m_initialized.store(true);
484
485 const size_t found = refresh_devices();
486
488 "TabletBackend initialized, {} tool(s)", found);
489
490 return true;
491}
#define MF_INFO(comp, ctx,...)
#define MF_ERROR(comp, ctx,...)
std::atomic< bool > m_initialized
size_t refresh_devices() override
Refresh the device list.
@ InputBackend
Input device backend (HID, MIDI, OSC)
@ Core
Core engine, backend, subsystems.

References MayaFlux::Journal::Core, MayaFlux::Journal::InputBackend, m_initialized, MF_ERROR, MF_INFO, and refresh_devices().

+ Here is the call graph for this function: