core/io/store_live.h
| Line | Branch | Exec | Source |
|---|---|---|---|
| 1 | /** | ||
| 2 | * @file store_live.h | ||
| 3 | * @brief Whether a store runs live after a reconfigure, the one rule every store with a reconfigure | ||
| 4 | * follows. | ||
| 5 | * | ||
| 6 | * Only a store's init decides whether it can ever run live. A store that init started with `live` | ||
| 7 | * false is pinned, and a reconfigure never turns it live, so a settings save in a build seeded for | ||
| 8 | * screenshots leaves the fixture on screen. A store that init started live is never pinned, and a | ||
| 9 | * reconfigure can stop it and start it again. The time store and the polling stores all ask here, so | ||
| 10 | * the rule cannot come out different from one store to the next. | ||
| 11 | * | ||
| 12 | * @ingroup lib_core | ||
| 13 | */ | ||
| 14 | #pragma once | ||
| 15 | #include <stdbool.h> | ||
| 16 | |||
| 17 | /** | ||
| 18 | * @addtogroup lib_core | ||
| 19 | * @{ | ||
| 20 | */ | ||
| 21 | |||
| 22 | /** | ||
| 23 | * @brief Whether a store runs live once a reconfigure has asked for @p live. | ||
| 24 | * | ||
| 25 | * @param live What the reconfigure asked for. | ||
| 26 | * @param pinned True when init started the store with `live` false. | ||
| 27 | * @return True only when the reconfigure asked for live and the store is not pinned. | ||
| 28 | */ | ||
| 29 | 38 | static inline bool store_live_after_reconfigure(bool live, bool pinned) | |
| 30 | { | ||
| 31 |
4/4✓ Branch 2 → 3 taken 26 times.
✓ Branch 2 → 5 taken 12 times.
✓ Branch 3 → 4 taken 20 times.
✓ Branch 3 → 5 taken 6 times.
|
38 | return live && !pinned; |
| 32 | } | ||
| 33 | |||
| 34 | /** @} */ | ||
| 35 |