summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/MappingCommon.h
diff options
context:
space:
mode:
authorLéo Lam <leo@leolam.fr>2022-03-15 15:54:04 +0100
committerGitHub <noreply@github.com>2022-03-15 15:54:04 +0100
commitda6f86f381e1a78ed7bb0ab19af34d6ce5251257 (patch)
tree8e14977517596ceb82c10abcb63658de0cbb5abe /Source/Core/InputCommon/ControllerInterface/MappingCommon.h
parenta99c993f1de5860bcdef013433a48e9556543329 (diff)
parent1bc057614e6d101e4f26db18fa60af2e9e2d0be7 (diff)
Merge pull request #10496 from JosJuice/mappingcommon-split
Move parts of MappingCommon out of DolphinQt
Diffstat (limited to 'Source/Core/InputCommon/ControllerInterface/MappingCommon.h')
-rw-r--r--Source/Core/InputCommon/ControllerInterface/MappingCommon.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/Source/Core/InputCommon/ControllerInterface/MappingCommon.h b/Source/Core/InputCommon/ControllerInterface/MappingCommon.h
new file mode 100644
index 0000000000..1822125557
--- /dev/null
+++ b/Source/Core/InputCommon/ControllerInterface/MappingCommon.h
@@ -0,0 +1,29 @@
+// Copyright 2022 Dolphin Emulator Project
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#pragma once
+
+#include <string>
+#include <vector>
+
+#include "InputCommon/ControllerInterface/CoreDevice.h"
+
+namespace ciface::MappingCommon
+{
+enum class Quote
+{
+ On,
+ Off
+};
+
+std::string GetExpressionForControl(const std::string& control_name,
+ const ciface::Core::DeviceQualifier& control_device,
+ const ciface::Core::DeviceQualifier& default_device,
+ Quote quote = Quote::On);
+
+std::string BuildExpression(const std::vector<ciface::Core::DeviceContainer::InputDetection>&,
+ const ciface::Core::DeviceQualifier& default_device, Quote quote);
+
+void RemoveSpuriousTriggerCombinations(std::vector<ciface::Core::DeviceContainer::InputDetection>*);
+
+} // namespace ciface::MappingCommon