summaryrefslogtreecommitdiff
path: root/src/core/frontend/applets/controller.h
diff options
context:
space:
mode:
authorGravatar bunnei2020-09-10 19:28:23 -0400
committerGravatar GitHub2020-09-10 19:28:23 -0400
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.gz
yuzu-03179ecafe8a5e9dedcab57f593f47ecc71b6877.tar.xz
yuzu-03179ecafe8a5e9dedcab57f593f47ecc71b6877.zip
Merge pull request #4597 from Morph1984/mjolnir-p2
Project Mjölnir: Part 2 - Controller Applet
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 @@
1// Copyright 2020 yuzu Emulator Project
2// Licensed under GPLv2 or any later version
3// Refer to the license.txt file included.
4
5#pragma once
6
7#include <functional>
8
9#include "common/common_types.h"
10
11namespace Core::Frontend {
12
13using BorderColor = std::array<u8, 4>;
14using ExplainText = std::array<char, 0x81>;
15
16struct ControllerParameters {
17 s8 min_players{};
18 s8 max_players{};
19 bool keep_controllers_connected{};
20 bool enable_single_mode{};
21 bool enable_border_color{};
22 std::vector<BorderColor> border_colors{};
23 bool enable_explain_text{};
24 std::vector<ExplainText> explain_text{};
25 bool allow_pro_controller{};
26 bool allow_handheld{};
27 bool allow_dual_joycons{};
28 bool allow_left_joycon{};
29 bool allow_right_joycon{};
30};
31
32class ControllerApplet {
33public:
34 virtual ~ControllerApplet();
35
36 virtual void ReconfigureControllers(std::function<void()> callback,
37 ControllerParameters parameters) const = 0;
38};
39
40class DefaultControllerApplet final : public ControllerApplet {
41public:
42 ~DefaultControllerApplet() override;
43
44 void ReconfigureControllers(std::function<void()> callback,
45 ControllerParameters parameters) const override;
46};
47
48} // namespace Core::Frontend