From 1bc057614e6d101e4f26db18fa60af2e9e2d0be7 Mon Sep 17 00:00:00 2001 From: JosJuice Date: Sun, 20 Feb 2022 18:32:39 +0100 Subject: Move parts of MappingCommon out of DolphinQt Some of the functions in MappingCommon would be useful to use on mobile in the future. --- .../ControllerInterface/MappingCommon.h | 29 ++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Source/Core/InputCommon/ControllerInterface/MappingCommon.h (limited to 'Source/Core/InputCommon/ControllerInterface/MappingCommon.h') 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 +#include + +#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&, + const ciface::Core::DeviceQualifier& default_device, Quote quote); + +void RemoveSpuriousTriggerCombinations(std::vector*); + +} // namespace ciface::MappingCommon -- cgit v1.2.3