diff options
author | Narr the Reg <juangerman-13@hotmail.com> | 2023-12-06 01:39:18 +0100 |
---|---|---|
committer | Narr the Reg <juangerman-13@hotmail.com> | 2023-12-07 03:24:04 +0100 |
commit | e445ef9d607d04dab185be55b1395007a40c3b81 (patch) | |
tree | 663039ca69e79c19ad35cd188f31b3135a790963 /src/core/hle/service/hid/resource_manager.h | |
parent | Merge pull request #12271 from liamwhite/pretext-fix (diff) | |
download | yuzu-e445ef9d607d04dab185be55b1395007a40c3b81.tar yuzu-e445ef9d607d04dab185be55b1395007a40c3b81.tar.gz yuzu-e445ef9d607d04dab185be55b1395007a40c3b81.tar.bz2 yuzu-e445ef9d607d04dab185be55b1395007a40c3b81.tar.lz yuzu-e445ef9d607d04dab185be55b1395007a40c3b81.tar.xz yuzu-e445ef9d607d04dab185be55b1395007a40c3b81.tar.zst yuzu-e445ef9d607d04dab185be55b1395007a40c3b81.zip |
Diffstat (limited to '')
-rw-r--r-- | src/core/hle/service/hid/resource_manager.h | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/core/hle/service/hid/resource_manager.h b/src/core/hle/service/hid/resource_manager.h index 2b6a9b5e6..a78e2b729 100644 --- a/src/core/hle/service/hid/resource_manager.h +++ b/src/core/hle/service/hid/resource_manager.h @@ -6,11 +6,20 @@ #include "core/hle/service/kernel_helpers.h" #include "core/hle/service/service.h" +namespace Core { +class System; +} + namespace Core::Timing { struct EventType; } +namespace Kernel { +class KSharedMemory; +} + namespace Service::HID { +class AppletResource; class Controller_Stubbed; class ConsoleSixAxis; class DebugPad; @@ -38,6 +47,7 @@ public: void Initialize(); + std::shared_ptr<AppletResource> GetAppletResource() const; std::shared_ptr<CaptureButton> GetCaptureButton() const; std::shared_ptr<ConsoleSixAxis> GetConsoleSixAxis() const; std::shared_ptr<DebugMouse> GetDebugMouse() const; @@ -54,6 +64,18 @@ public: std::shared_ptr<TouchScreen> GetTouchScreen() const; std::shared_ptr<UniquePad> GetUniquePad() const; + Result CreateAppletResource(u64 aruid); + + Result RegisterAppletResourceUserId(u64 aruid, bool bool_value); + void UnregisterAppletResourceUserId(u64 aruid); + + Result GetSharedMemoryHandle(Kernel::KSharedMemory** out_handle, u64 aruid); + + void EnableInput(u64 aruid, bool is_enabled); + void EnableSixAxisSensor(u64 aruid, bool is_enabled); + void EnablePadInput(u64 aruid, bool is_enabled); + void EnableTouchScreen(u64 aruid, bool is_enabled); + void UpdateControllers(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); void UpdateNpad(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); void UpdateMouseKeyboard(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); @@ -62,6 +84,9 @@ public: private: bool is_initialized{false}; + mutable std::mutex shared_mutex; + std::shared_ptr<AppletResource> applet_resource = nullptr; + std::shared_ptr<CaptureButton> capture_button = nullptr; std::shared_ptr<ConsoleSixAxis> console_six_axis = nullptr; std::shared_ptr<DebugMouse> debug_mouse = nullptr; @@ -106,6 +131,8 @@ private: std::shared_ptr<Core::Timing::EventType> default_update_event; std::shared_ptr<Core::Timing::EventType> mouse_keyboard_update_event; std::shared_ptr<Core::Timing::EventType> motion_update_event; + + std::shared_ptr<ResourceManager> resource_manager; }; } // namespace Service::HID |