|
|
@ -353,11 +353,12 @@ void InputEngine::SetMappingCallback(MappingCallback callback) { |
|
|
|
|
|
|
|
|
void InputEngine::DeleteCallback(int key) { |
|
|
void InputEngine::DeleteCallback(int key) { |
|
|
std::lock_guard lock{mutex_callback}; |
|
|
std::lock_guard lock{mutex_callback}; |
|
|
if (!callback_list.contains(key)) { |
|
|
|
|
|
|
|
|
const auto& iterator = callback_list.find(key); |
|
|
|
|
|
if (iterator == callback_list.end()) { |
|
|
LOG_ERROR(Input, "Tried to delete non-existent callback {}", key); |
|
|
LOG_ERROR(Input, "Tried to delete non-existent callback {}", key); |
|
|
return; |
|
|
return; |
|
|
} |
|
|
} |
|
|
callback_list.erase(key); |
|
|
|
|
|
|
|
|
callback_list.erase(iterator); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
} // namespace InputCommon
|
|
|
} // namespace InputCommon
|