summaryrefslogtreecommitdiff
path: root/Source/Core/InputCommon/ControllerInterface/MappingCommon.h
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2022-02-20 18:32:39 +0100
committerJosJuice <josjuice@gmail.com>2022-03-06 14:30:49 +0100
commit1bc057614e6d101e4f26db18fa60af2e9e2d0be7 (patch)
tree95894784ebd817c0f43e17c6d4ee6bb851ca206b /Source/Core/InputCommon/ControllerInterface/MappingCommon.h
parent9af9e791f6a19d62197ad0d2e0fc39ed744cd506 (diff)
Move parts of MappingCommon out of DolphinQt
Some of the functions in MappingCommon would be useful to use on mobile in the future.
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