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_console.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_console.cpp')
| -rw-r--r-- | src/core/hid/emulated_console.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/core/hid/emulated_console.cpp b/src/core/hid/emulated_console.cpp index 012909954..dfbaa3f8c 100644 --- a/src/core/hid/emulated_console.cpp +++ b/src/core/hid/emulated_console.cpp | |||
| @@ -209,10 +209,11 @@ int EmulatedConsole::SetCallback(ConsoleUpdateCallback update_callback) { | |||
| 209 | 209 | ||
| 210 | void EmulatedConsole::DeleteCallback(int key) { | 210 | void EmulatedConsole::DeleteCallback(int key) { |
| 211 | std::lock_guard lock{mutex}; | 211 | std::lock_guard lock{mutex}; |
| 212 | if (!callback_list.contains(key)) { | 212 | const auto& iterator = callback_list.find(key); |
| 213 | if (iterator == callback_list.end()) { | ||
| 213 | LOG_ERROR(Input, "Tried to delete non-existent callback {}", key); | 214 | LOG_ERROR(Input, "Tried to delete non-existent callback {}", key); |
| 214 | return; | 215 | return; |
| 215 | } | 216 | } |
| 216 | callback_list.erase(key); | 217 | callback_list.erase(iterator); |
| 217 | } | 218 | } |
| 218 | } // namespace Core::HID | 219 | } // namespace Core::HID |