MayaFlux 1.0.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 900 of file TabletBackend.cpp.

901{
902 std::shared_ptr<TabletDevice> device;
903 std::string path;
904
905 {
906 std::lock_guard lock(m_devices_mutex);
907 auto path_it = m_tool_paths.find(device_id);
908 if (path_it == m_tool_paths.end())
909 return;
910 path = path_it->second;
911
912 auto dev_it = m_devices.find(path);
913 if (dev_it == m_devices.end())
914 return;
915 device = dev_it->second;
916 }
917
918 device->active.store(false);
919}
vk::PhysicalDevice device
Definition VKDevice.cpp:121
std::unordered_map< uint32_t, std::string > m_tool_paths
std::unordered_map< std::string, std::shared_ptr< TabletDevice > > m_devices

References device, m_devices, m_devices_mutex, and m_tool_paths.