MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / PerformAction

Method PerformAction

plugins/base/macro-action-plugin-state.cpp:131–168  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

129}
130
131bool MacroActionPluginState::PerformAction()
132{
133 switch (_action) {
134 case Action::STOP:
135 stopPlugin();
136 break;
137 case Action::NO_MATCH_BEHAVIOUR:
138 setNoMatchBehaviour(_value, _scene);
139 break;
140 case Action::IMPORT_SETTINGS:
141 importSettings(_settingsPath);
142 // There is no point in continuing
143 // The settings will be invalid
144 return false;
145 case Action::TERMINATE: {
146 std::thread thread([this]() {
147 obs_queue_task(OBS_TASK_UI,
148 this->_confirmShutdown ? askTerminateOBS
149 : closeOBSWindow,
150 nullptr, false);
151 });
152 thread.detach();
153 break;
154 }
155 case Action::ENABLE_MACRO_HIGHLIGHTING:
156 SetMacroHighlightingEnabled(true);
157 break;
158 case Action::DISABLE_MACRO_HIGHLIGHTING:
159 SetMacroHighlightingEnabled(false);
160 break;
161 case Action::TOGGLE_MACRO_HIGHLIGHTING:
162 SetMacroHighlightingEnabled(!IsMacroHighlightingEnabled());
163 break;
164 default:
165 break;
166 }
167 return true;
168}
169
170void MacroActionPluginState::LogAction() const
171{

Callers

nothing calls this directly

Calls 5

stopPluginFunction · 0.85
setNoMatchBehaviourFunction · 0.85
importSettingsFunction · 0.85

Tested by

no test coverage detected