| 1125 | static int macroHotkeyID = 0; |
| 1126 | |
| 1127 | static 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 | |
| 1141 | void Macro::SetupHotkeys() |
| 1142 | { |
no test coverage detected