FastLED 3.10.8
Loading...
Searching...
No Matches

◆ isDriverEnabled() [2/2]

bool fl::ChannelManager::isDriverEnabled ( const IChannelDriver & driver) const

Enabled state of a driver instance, matched by pointer.

Note
Per-frame show paths use this instead of the name overload: no fl::string is built and no names are compared (#4799). Falls back to the name when this instance is not the registered one.

Definition at line 334 of file manager.cpp.hpp.

334 {
335 for (const auto& entry : mDrivers) {
336 if (entry.driver.get() == &driver) {
337 return entry.enabled;
338 }
339 }
340 // Not registered by instance (e.g. replaced by a same-name driver).
341 return isDriverEnabled(driver.getName().c_str());
342}
fl::vector< EngineEntry > mDrivers
Shared drivers sorted by priority descending (higher values first)
Definition manager.h:327
bool isDriverEnabled(const char *name) const FL_NO_EXCEPT
Check if a driver is enabled by name.

References fl::FL_NO_EXCEPT, isDriverEnabled(), and mDrivers.

+ Here is the call graph for this function: