diff options
Diffstat (limited to 'src/core/hle/service/hid/resource_manager.h')
-rw-r--r-- | src/core/hle/service/hid/resource_manager.h | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/core/hle/service/hid/resource_manager.h b/src/core/hle/service/hid/resource_manager.h index 5ad7cb564..7a21d8eb8 100644 --- a/src/core/hle/service/hid/resource_manager.h +++ b/src/core/hle/service/hid/resource_manager.h @@ -20,24 +20,23 @@ class KSharedMemory; namespace Service::HID { class AppletResource; +class CaptureButton; class Controller_Stubbed; class ConsoleSixAxis; +class DebugMouse; class DebugPad; +class Digitizer; class Gesture; +class HomeButton; class Keyboard; class Mouse; class NPad; class Palma; class SevenSixAxis; class SixAxis; +class SleepButton; class TouchScreen; - -using CaptureButton = Controller_Stubbed; -using DebugMouse = Mouse; -using Digitizer = Controller_Stubbed; -using HomeButton = Controller_Stubbed; -using SleepButton = Controller_Stubbed; -using UniquePad = Controller_Stubbed; +class UniquePad; class ResourceManager { @@ -46,7 +45,6 @@ public: ~ResourceManager(); void Initialize(); - void InitializeController(u64 aruid); std::shared_ptr<AppletResource> GetAppletResource() const; std::shared_ptr<CaptureButton> GetCaptureButton() const; @@ -81,17 +79,21 @@ public: 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); - void UpdateMotion(std::uintptr_t user_data, std::chrono::nanoseconds ns_late); + void UpdateControllers(std::chrono::nanoseconds ns_late); + void UpdateNpad(std::chrono::nanoseconds ns_late); + void UpdateMouseKeyboard(std::chrono::nanoseconds ns_late); + void UpdateMotion(std::chrono::nanoseconds ns_late); private: Result CreateAppletResourceImpl(u64 aruid); + void InitializeHidCommonSampler(); + void InitializeTouchScreenSampler(); + void InitializeConsoleSixAxisSampler(); + void InitializeAHidSampler(); bool is_initialized{false}; - mutable std::mutex shared_mutex; + mutable std::recursive_mutex shared_mutex; std::shared_ptr<AppletResource> applet_resource = nullptr; std::shared_ptr<CaptureButton> capture_button = nullptr; |