| 54 | |
| 55 | template<typename Func, typename... Args> |
| 56 | static auto getConfigValueHelper(Func func, Func defaultFunc, Args... args) |
| 57 | -> std::optional<std::invoke_result_t<Func, config_t *, Args...>> |
| 58 | { |
| 59 | using Ret = std::invoke_result_t<Func, config_t *, Args...>; |
| 60 | |
| 61 | auto config = obs_frontend_get_profile_config(); |
| 62 | if (config_has_user_value(config, args...)) { |
| 63 | return func(config, args...); |
| 64 | } |
| 65 | if (config_has_default_value(config, args...)) { |
| 66 | return defaultFunc(config, args...); |
| 67 | } |
| 68 | return std::optional<Ret>{}; |
| 69 | } |
| 70 | |
| 71 | static void setPreviewEnabled(bool enabled) |
| 72 | { |
no outgoing calls
no test coverage detected