summaryrefslogtreecommitdiffstats
path: root/src/hid_core/resource_manager.h
diff options
context:
space:
mode:
authorNarr the Reg <juangerman-13@hotmail.com>2024-01-11 05:06:54 +0100
committergerman77 <juangerman-13@hotmail.com>2024-01-16 06:15:40 +0100
commit2cacb9d48c98603176e52ecc94f2374a934797fb (patch)
tree12badf5b4eede22b22dece03a9074197ec631a1e /src/hid_core/resource_manager.h
parentMerge pull request #12686 from szepeviktor/typos3 (diff)
downloadyuzu-2cacb9d48c98603176e52ecc94f2374a934797fb.tar
yuzu-2cacb9d48c98603176e52ecc94f2374a934797fb.tar.gz
yuzu-2cacb9d48c98603176e52ecc94f2374a934797fb.tar.bz2
yuzu-2cacb9d48c98603176e52ecc94f2374a934797fb.tar.lz
yuzu-2cacb9d48c98603176e52ecc94f2374a934797fb.tar.xz
yuzu-2cacb9d48c98603176e52ecc94f2374a934797fb.tar.zst
yuzu-2cacb9d48c98603176e52ecc94f2374a934797fb.zip
Diffstat (limited to 'src/hid_core/resource_manager.h')
-rw-r--r--src/hid_core/resource_manager.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/hid_core/resource_manager.h b/src/hid_core/resource_manager.h
index 7a21d8eb8..128e00125 100644
--- a/src/hid_core/resource_manager.h
+++ b/src/hid_core/resource_manager.h
@@ -10,6 +10,12 @@ namespace Core {
class System;
}
+namespace Core::HID {
+struct VibrationDeviceHandle;
+struct VibrationValue;
+struct VibrationDeviceInfo;
+} // namespace Core::HID
+
namespace Core::Timing {
struct EventType;
}
@@ -37,6 +43,11 @@ class SixAxis;
class SleepButton;
class TouchScreen;
class UniquePad;
+class NpadVibrationBase;
+class NpadN64VibrationDevice;
+class NpadGcVibrationDevice;
+class NpadVibrationDevice;
+struct HandheldConfig;
class ResourceManager {
@@ -79,6 +90,18 @@ public:
void EnablePadInput(u64 aruid, bool is_enabled);
void EnableTouchScreen(u64 aruid, bool is_enabled);
+ NpadVibrationBase* GetVibrationDevice(const Core::HID::VibrationDeviceHandle& handle);
+ NpadN64VibrationDevice* GetN64VibrationDevice(const Core::HID::VibrationDeviceHandle& handle);
+ NpadVibrationDevice* GetNSVibrationDevice(const Core::HID::VibrationDeviceHandle& handle);
+ NpadGcVibrationDevice* GetGcVibrationDevice(const Core::HID::VibrationDeviceHandle& handle);
+ Result SetAruidValidForVibration(u64 aruid, bool is_enabled);
+ void SetForceHandheldStyleVibration(bool is_forced);
+ Result IsVibrationAruidActive(u64 aruid, bool& is_active) const;
+ Result GetVibrationDeviceInfo(Core::HID::VibrationDeviceInfo& device_info,
+ const Core::HID::VibrationDeviceHandle& handle);
+ Result SendVibrationValue(u64 aruid, const Core::HID::VibrationDeviceHandle& handle,
+ const Core::HID::VibrationValue& value);
+
void UpdateControllers(std::chrono::nanoseconds ns_late);
void UpdateNpad(std::chrono::nanoseconds ns_late);
void UpdateMouseKeyboard(std::chrono::nanoseconds ns_late);
@@ -113,6 +136,8 @@ private:
std::shared_ptr<TouchScreen> touch_screen = nullptr;
std::shared_ptr<UniquePad> unique_pad = nullptr;
+ std::shared_ptr<HandheldConfig> handheld_config = nullptr;
+
// TODO: Create these resources
// std::shared_ptr<AudioControl> audio_control = nullptr;
// std::shared_ptr<ButtonConfig> button_config = nullptr;