summaryrefslogtreecommitdiffstats
path: root/src/core/hid/emulated_controller.h
diff options
context:
space:
mode:
authorgerman77 <juangerman-13@hotmail.com>2021-10-11 07:43:11 +0200
committerNarr the Reg <juangerman-13@hotmail.com>2021-11-25 03:30:24 +0100
commit06a5ef5874144a70e30e577a83ba68d1dad79e78 (patch)
tree867fa1153c7285c858cdb5bd7f60f08266532a88 /src/core/hid/emulated_controller.h
parentcore: Update input interpreter (diff)
downloadyuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar
yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.gz
yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.bz2
yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.lz
yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.xz
yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.tar.zst
yuzu-06a5ef5874144a70e30e577a83ba68d1dad79e78.zip
Diffstat (limited to 'src/core/hid/emulated_controller.h')
-rw-r--r--src/core/hid/emulated_controller.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/core/hid/emulated_controller.h b/src/core/hid/emulated_controller.h
index 94db9b00b..322d2cab0 100644
--- a/src/core/hid/emulated_controller.h
+++ b/src/core/hid/emulated_controller.h
@@ -33,12 +33,14 @@ using ControllerMotionDevices =
using TriggerDevices =
std::array<std::unique_ptr<Input::InputDevice>, Settings::NativeTrigger::NumTriggers>;
using BatteryDevices = std::array<std::unique_ptr<Input::InputDevice>, 2>;
+using OutputDevices = std::array<std::unique_ptr<Input::OutputDevice>, 2>;
using ButtonParams = std::array<Common::ParamPackage, Settings::NativeButton::NumButtons>;
using StickParams = std::array<Common::ParamPackage, Settings::NativeAnalog::NumAnalogs>;
using ControllerMotionParams = std::array<Common::ParamPackage, Settings::NativeMotion::NumMotions>;
using TriggerParams = std::array<Common::ParamPackage, Settings::NativeTrigger::NumTriggers>;
using BatteryParams = std::array<Common::ParamPackage, 2>;
+using OutputParams = std::array<Common::ParamPackage, 2>;
using ButtonValues = std::array<Input::ButtonStatus, Settings::NativeButton::NumButtons>;
using SticksValues = std::array<Input::StickStatus, Settings::NativeAnalog::NumAnalogs>;
@@ -94,6 +96,7 @@ struct ControllerStatus {
ControllerColors colors_state{};
BatteryLevelState battery_state{};
};
+
enum class ControllerTriggerType {
Button,
Stick,
@@ -137,6 +140,9 @@ public:
/// Gets the NpadType for this controller.
NpadType GetNpadType() const;
+ /// Gets the NpadType for this controller.
+ LedPattern GetLedPattern() const;
+
void Connect();
void Disconnect();
@@ -179,7 +185,9 @@ public:
BatteryLevelState GetBattery() const;
bool SetVibration(std::size_t device_index, VibrationValue vibration);
- int TestVibration(std::size_t device_index);
+ bool TestVibration(std::size_t device_index);
+
+ void SetLedPattern();
int SetCallback(ControllerUpdateCallback update_callback);
void DeleteCallback(int key);
@@ -215,13 +223,14 @@ private:
ControllerMotionParams motion_params;
TriggerParams trigger_params;
BatteryParams battery_params;
+ OutputParams output_params;
ButtonDevices button_devices;
StickDevices stick_devices;
ControllerMotionDevices motion_devices;
TriggerDevices trigger_devices;
BatteryDevices battery_devices;
- // VibrationDevices vibration_devices;
+ OutputDevices output_devices;
mutable std::mutex mutex;
std::unordered_map<int, ControllerUpdateCallback> callback_list;