summaryrefslogtreecommitdiffstats
path: root/src/core/frontend/applets/controller.h
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2020-09-11 01:28:23 +0200
committerGitHub <noreply@github.com>2020-09-11 01:28:23 +0200
commit03179ecafe8a5e9dedcab57f593f47ecc71b6877 (patch)
treeac862b62f9d1e8c3c50915dcefc3f34863140e93 /src/core/frontend/applets/controller.h
parentMerge pull request #4608 from lioncash/sign3 (diff)
parentResolve spacing inconsistencies in style.qrc/qss files (diff)
downloadyuzu-03179ecafe8a5e9dedcab57f593f47ecc71b6877.tar
yuzu-03179ecafe8a5e9dedcab57f593f47ecc71b6877.tar.gz
yuzu-03179ecafe8a5e9dedcab57f593f47ecc71b6877.tar.bz2
yuzu-03179ecafe8a5e9dedcab57f593f47ecc71b6877.tar.lz
yuzu-03179ecafe8a5e9dedcab57f593f47ecc71b6877.tar.xz
yuzu-03179ecafe8a5e9dedcab57f593f47ecc71b6877.tar.zst
yuzu-03179ecafe8a5e9dedcab57f593f47ecc71b6877.zip
Diffstat (limited to 'src/core/frontend/applets/controller.h')
-rw-r--r--src/core/frontend/applets/controller.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/core/frontend/applets/controller.h b/src/core/frontend/applets/controller.h
new file mode 100644
index 000000000..a227f15cd
--- /dev/null
+++ b/src/core/frontend/applets/controller.h
@@ -0,0 +1,48 @@
+// Copyright 2020 yuzu Emulator Project
+// Licensed under GPLv2 or any later version
+// Refer to the license.txt file included.
+
+#pragma once
+
+#include <functional>
+
+#include "common/common_types.h"
+
+namespace Core::Frontend {
+
+using BorderColor = std::array<u8, 4>;
+using ExplainText = std::array<char, 0x81>;
+
+struct ControllerParameters {
+ s8 min_players{};
+ s8 max_players{};
+ bool keep_controllers_connected{};
+ bool enable_single_mode{};
+ bool enable_border_color{};
+ std::vector<BorderColor> border_colors{};
+ bool enable_explain_text{};
+ std::vector<ExplainText> explain_text{};
+ bool allow_pro_controller{};
+ bool allow_handheld{};
+ bool allow_dual_joycons{};
+ bool allow_left_joycon{};
+ bool allow_right_joycon{};
+};
+
+class ControllerApplet {
+public:
+ virtual ~ControllerApplet();
+
+ virtual void ReconfigureControllers(std::function<void()> callback,
+ ControllerParameters parameters) const = 0;
+};
+
+class DefaultControllerApplet final : public ControllerApplet {
+public:
+ ~DefaultControllerApplet() override;
+
+ void ReconfigureControllers(std::function<void()> callback,
+ ControllerParameters parameters) const override;
+};
+
+} // namespace Core::Frontend