summaryrefslogtreecommitdiffstats
path: root/src/core/hid/emulated_devices.cpp
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-11-01 21:17:53 +0100
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:26 +0100
commit77fa4d4bf60526826ef8b53ee3870f7d2a761976 (patch)
tree3c6c07d535bd912ed085be9b826103a6eabe718f /src/core/hid/emulated_devices.cpp
parentsettings: Fix Debug controller type options (diff)
downloadyuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar
yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.gz
yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.bz2
yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.lz
yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.xz
yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.zst
yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.zip
Diffstat (limited to '')
-rw-r--r--src/core/hid/emulated_devices.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hid/emulated_devices.cpp b/src/core/hid/emulated_devices.cpp
index c76a86b6c..e97470240 100644
--- a/src/core/hid/emulated_devices.cpp
+++ b/src/core/hid/emulated_devices.cpp
@@ -362,10 +362,11 @@ int EmulatedDevices::SetCallback(InterfaceUpdateCallback update_callback) {
void EmulatedDevices::DeleteCallback(int key) {
std::lock_guard lock{mutex};
- 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);
return;
}
- callback_list.erase(key);
+ callback_list.erase(iterator);
}
} // namespace Core::HID