| 225 | } |
| 226 | |
| 227 | void DispatchCommand(WPARAM keyPressed, const std::map<std::string, ModCommand, std::less<>>& commands) |
| 228 | { |
| 229 | for (const auto& [key, value] : commands) { |
| 230 | |
| 231 | if (keyPressed == Settings::GetKeyBind(key)) { |
| 232 | value.action(); |
| 233 | |
| 234 | if (!value.logMessage.empty()) { |
| 235 | LOG_INFO("Triggered: " << value.logMessage << std::endl); |
| 236 | } |
| 237 | |
| 238 | return; |
| 239 | } |
| 240 | } |
| 241 | } |
| 242 | |
| 243 | void InitializeCommands() |
| 244 | { |
no test coverage detected