diff options
| author | 2021-11-01 14:17:53 -0600 | |
|---|---|---|
| committer | 2021-11-24 20:30:26 -0600 | |
| commit | 77fa4d4bf60526826ef8b53ee3870f7d2a761976 (patch) | |
| tree | 3c6c07d535bd912ed085be9b826103a6eabe718f /src/core/hid/emulated_devices.cpp | |
| parent | settings: Fix Debug controller type options (diff) | |
| download | yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.gz yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.tar.xz yuzu-77fa4d4bf60526826ef8b53ee3870f7d2a761976.zip | |
second commit lion review
Diffstat (limited to 'src/core/hid/emulated_devices.cpp')
| -rw-r--r-- | src/core/hid/emulated_devices.cpp | 5 |
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) { | |||
| 362 | 362 | ||
| 363 | void EmulatedDevices::DeleteCallback(int key) { | 363 | void EmulatedDevices::DeleteCallback(int key) { |
| 364 | std::lock_guard lock{mutex}; | 364 | std::lock_guard lock{mutex}; |
| 365 | if (!callback_list.contains(key)) { | 365 | const auto& iterator = callback_list.find(key); |
| 366 | if (iterator == callback_list.end()) { | ||
| 366 | LOG_ERROR(Input, "Tried to delete non-existent callback {}", key); | 367 | LOG_ERROR(Input, "Tried to delete non-existent callback {}", key); |
| 367 | return; | 368 | return; |
| 368 | } | 369 | } |
| 369 | callback_list.erase(key); | 370 | callback_list.erase(iterator); |
| 370 | } | 371 | } |
| 371 | } // namespace Core::HID | 372 | } // namespace Core::HID |