Project Mjölnir: Part 2 - Controller Applet
Co-authored-by: Its-Rei <kupfel@gmail.com>
This commit is contained in:
parent
045f50bc7f
commit
5219615418
54 changed files with 4526 additions and 154 deletions
45
src/core/frontend/applets/controller.h
Normal file
45
src/core/frontend/applets/controller.h
Normal file
|
@ -0,0 +1,45 @@
|
|||
// 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>;
|
||||
|
||||
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 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
|
Loading…
Add table
Add a link
Reference in a new issue