From d523005c2bf2af8242ecd06d2a69059ff6b6de52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Henrik=20Rydg=C3=A5rd?= Date: Sat, 1 Apr 2023 19:02:20 +0200 Subject: [PATCH] Cleanup --- Core/ControlMapper.cpp | 4 ---- Core/KeyMap.h | 2 ++ 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Core/ControlMapper.cpp b/Core/ControlMapper.cpp index 64c2f3552c..e959fd3b5c 100644 --- a/Core/ControlMapper.cpp +++ b/Core/ControlMapper.cpp @@ -298,11 +298,7 @@ bool ControlMapper::UpdatePSPState(const InputMapping &changedMapping) { // Note: This is an old problem, it didn't appear with the refactoring. if (!changedMapping.IsAxis()) { for (auto &multiMapping : inputMappings) { - bool anyAxis = false; for (auto &mapping : multiMapping.mappings) { - if (mapping.IsAxis()) { - anyAxis = true; - } curInput_[mapping] = ReduceMagnitude(curInput_[mapping]); } } diff --git a/Core/KeyMap.h b/Core/KeyMap.h index b88c0e675e..283ccd35b1 100644 --- a/Core/KeyMap.h +++ b/Core/KeyMap.h @@ -149,6 +149,8 @@ namespace KeyMap { FixedTinyVec mappings; }; + // Once the multimappings are inserted here, they must not be empty. + // If one would be, delete the whole entry from the map instead. typedef std::map> KeyMapping; extern KeyMapping g_controllerMap;