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

◆ close_device()

void MayaFlux::Core::TabletBackend::close_device ( uint32_t  device_id)
overridevirtual

Close a previously opened device.

Parameters
device_idDevice identifier

Implements MayaFlux::Core::IInputBackend.

Definition at line 875 of file TabletBackend.cpp.

876{
877 std::shared_ptr<TabletDevice> device;
878 std::string path;
879
880 {
881 std::lock_guard lock(m_devices_mutex);
882 auto path_it = m_tool_paths.find(device_id);
883 if (path_it == m_tool_paths.end())
884 return;
885 path = path_it->second;
886
887 auto dev_it = m_devices.find(path);
888 if (dev_it == m_devices.end())
889 return;
890 device = dev_it->second;
891 }
892
893 device->active.store(false);
894}
std::unordered_map< uint32_t, std::string > m_tool_paths
std::unordered_map< std::string, std::shared_ptr< TabletDevice > > m_devices

References m_devices, m_devices_mutex, and m_tool_paths.