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

Function registerHotkeyHelper

lib/macro/macro.cpp:1127–1139  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1125static int macroHotkeyID = 0;
1126
1127static obs_hotkey_id registerHotkeyHelper(const std::string prefix,
1128 const char *formatModuleText,
1129 Macro *macro, obs_hotkey_func func)
1130{
1131 macroHotkeyID++;
1132
1133 std::string hotkeyName = prefix + std::to_string(macroHotkeyID);
1134 QString format{obs_module_text(formatModuleText)};
1135 QString hotkeyDesc = format.arg(QString::fromStdString(macro->Name()));
1136 return obs_hotkey_register_frontend(hotkeyName.c_str(),
1137 hotkeyDesc.toStdString().c_str(),
1138 func, macro);
1139}
1140
1141void Macro::SetupHotkeys()
1142{

Callers 1

SetupHotkeysMethod · 0.85

Calls 4

to_stringFunction · 0.85
obs_module_textFunction · 0.85
NameMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected