From f05f05b466b93d8a4a54d273a168582631d2d15e Mon Sep 17 00:00:00 2001 From: Isaac Marovitz Date: Sun, 10 Mar 2024 14:38:29 +0000 Subject: [PATCH] Move types --- .../Applets/Controller/ControllerApplet.cs | 2 +- .../Controller/ControllerAppletUIArgs.cs | 1 + .../SoftwareKeyboardApplet.cs | 1 - src/Ryujinx.HLE/HOS/Services/Hid/Hid.cs | 11 +- .../Services/Hid/HidDevices/DebugPadDevice.cs | 3 - .../Services/Hid/HidDevices/KeyboardDevice.cs | 3 +- .../Services/Hid/HidDevices/MouseDevice.cs | 3 - .../Services/Hid/HidDevices/NpadDevices.cs | 6 +- .../Services/Hid/HidDevices/TouchDevice.cs | 3 +- .../HOS/Services/Hid/HidServer/HidUtils.cs | 1 + .../HOS/Services/Hid/IHidServer.cs | 6 +- .../HOS/Services/Hid/IHidSystemServer.cs | 2 +- .../HOS/Services/Hid/IHidbusServer.cs | 1 + .../HOS/Services/Hid/Irs/IIrSensorServer.cs | 2 +- .../HOS/Services/Nfc/Nfp/NfpManager/INfp.cs | 1 + .../Nfc/Nfp/NfpManager/Types/NfpDevice.cs | 1 + .../HOS/Tamper/AtmosphereProgram.cs | 1 + src/Ryujinx.HLE/HOS/Tamper/ITamperProgram.cs | 1 + src/Ryujinx.HLE/HOS/TamperMachine.cs | 2 + src/Ryujinx.HLE/UI/Input/NpadButtonHandler.cs | 2 - src/Ryujinx.HLE/UI/Input/NpadReader.cs | 3 - .../Sdk/Hid}/AppletFooterUiType.cs | 2 +- .../Sdk/Hid}/ControllerConfig.cs | 4 +- .../Sdk/Hid}/GamepadInput.cs | 4 +- .../Sdk/Hid}/HidVector.cs | 2 +- .../Sdk/Hid/IHidDebugServer.cs | 128 ++++++++++++++++++ src/Ryujinx.Horizon/Sdk/Hid/IHidbusServer.cs | 25 ++++ .../Sdk/Hid/IHidbusSystemServer.cs | 13 ++ .../Sdk/Hid}/JoystickPosition.cs | 2 +- .../Sdk/Hid}/KeyboardInput.cs | 2 +- .../Sdk/Hid}/Npad/BusHandle.cs | 2 +- .../Sdk/Hid}/Npad/BusType.cs | 2 +- .../Sdk/Hid}/Npad/ControllerKeys.cs | 2 +- .../Sdk/Hid}/Npad/ControllerType.cs | 2 +- .../Sdk/Hid}/Npad/NpadColor.cs | 2 +- .../Hid}/Npad/NpadHandheldActivationMode.cs | 2 +- .../Sdk/Hid}/Npad/NpadIdType.cs | 2 +- .../Sdk/Hid}/Npad/NpadJoyDeviceType.cs | 2 +- .../Sdk/Hid}/Npad/NpadStyleIndex.cs | 2 +- .../Sdk/Hid}/Npad/PlayerIndex.cs | 2 +- .../Sdk/Hid}/NpadJoyHoldType.cs | 2 +- .../SharedMemory/Common/AnalogStickState.cs | 2 +- .../Hid}/SharedMemory/Common/AtomicStorage.cs | 2 +- .../SharedMemory/Common/ISampledDataStruct.cs | 2 +- .../Sdk/Hid}/SharedMemory/Common/RingLifo.cs | 2 +- .../DebugPad/DebugPadAttribute.cs | 2 +- .../SharedMemory/DebugPad/DebugPadButton.cs | 2 +- .../SharedMemory/DebugPad/DebugPadState.cs | 4 +- .../Hid}/SharedMemory/Keyboard/KeyboardKey.cs | 2 +- .../SharedMemory/Keyboard/KeyboardKeyShift.cs | 2 +- .../SharedMemory/Keyboard/KeyboardModifier.cs | 2 +- .../SharedMemory/Keyboard/KeyboardState.cs | 4 +- .../Hid}/SharedMemory/Mouse/MouseAttribute.cs | 2 +- .../Hid}/SharedMemory/Mouse/MouseButton.cs | 2 +- .../Sdk/Hid}/SharedMemory/Mouse/MouseState.cs | 4 +- .../Sdk/Hid}/SharedMemory/Npad/DeviceType.cs | 2 +- .../Hid}/SharedMemory/Npad/NpadAttribute.cs | 2 +- .../SharedMemory/Npad/NpadBatteryLevel.cs | 2 +- .../Sdk/Hid}/SharedMemory/Npad/NpadButton.cs | 2 +- .../SharedMemory/Npad/NpadColorAttribute.cs | 2 +- .../Hid}/SharedMemory/Npad/NpadCommonState.cs | 4 +- .../Npad/NpadFullKeyColorState.cs | 2 +- .../SharedMemory/Npad/NpadGcTriggerState.cs | 4 +- .../SharedMemory/Npad/NpadInternalState.cs | 4 +- .../Npad/NpadJoyAssignmentMode.cs | 2 +- .../SharedMemory/Npad/NpadJoyColorState.cs | 2 +- .../Hid}/SharedMemory/Npad/NpadLarkType.cs | 2 +- .../Hid}/SharedMemory/Npad/NpadLuciaType.cs | 2 +- .../Sdk/Hid}/SharedMemory/Npad/NpadState.cs | 2 +- .../Hid}/SharedMemory/Npad/NpadStyleTag.cs | 2 +- .../Npad/NpadSystemButtonProperties.cs | 2 +- .../SharedMemory/Npad/NpadSystemProperties.cs | 2 +- .../Npad/SixAxisSensorAttribute.cs | 2 +- .../SharedMemory/Npad/SixAxisSensorState.cs | 4 +- .../Sdk/Hid}/SharedMemory/SharedMemory.cs | 14 +- .../TouchScreen/TouchAttribute.cs | 2 +- .../TouchScreen/TouchScreenState.cs | 4 +- .../SharedMemory/TouchScreen/TouchState.cs | 2 +- .../Hid}/SixAxis/AccelerometerParameters.cs | 2 +- .../Hid}/SixAxis/GyroscopeZeroDriftMode.cs | 2 +- .../Hid}/SixAxis/SensorFusionParameters.cs | 2 +- .../Sdk/Hid}/SixAxisInput.cs | 3 +- .../Sdk/Hid}/TouchPoint.cs | 4 +- .../Hid}/Vibration/VibrationDeviceHandle.cs | 2 +- .../Hid}/Vibration/VibrationDevicePosition.cs | 2 +- .../Sdk/Hid}/Vibration/VibrationDeviceType.cs | 2 +- .../Hid}/Vibration/VibrationDeviceValue.cs | 2 +- .../Sdk/Hid}/Vibration/VibrationValue.cs | 2 +- .../Sdk/Irsensor/IIrSensorServer.cs | 29 ++++ .../Irsensor}/ImageTransferProcessorState.cs | 2 +- .../Sdk/Irsensor}/IrCameraHandle.cs | 2 +- .../PackedClusteringProcessorConfig.cs | 4 +- .../Sdk/Irsensor/PackedFunctionLevel.cs | 10 ++ .../PackedImageTransferProcessorConfig.cs | 4 +- .../PackedImageTransferProcessorExConfig.cs | 20 +++ .../Irsensor/PackedIrLedProcessorConfig.cs | 11 ++ .../Sdk/Irsensor/PackedMcuVersion.cs | 11 ++ .../Irsensor}/PackedMomentProcessorConfig.cs | 4 +- .../Irsensor/PackedPointingProcessorConfig.cs | 14 ++ .../PackedTeraPluginProcessorConfig.cs | 4 +- src/Ryujinx.Input/HLE/NpadController.cs | 3 + src/Ryujinx.Input/HLE/NpadManager.cs | 3 +- src/Ryujinx.Input/HLE/TouchScreenManager.cs | 3 +- .../UI/Applet/ControllerAppletDialog.axaml.cs | 2 + 104 files changed, 389 insertions(+), 122 deletions(-) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/AppletFooterUiType.cs (92%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types => Ryujinx.Horizon/Sdk/Hid}/ControllerConfig.cs (63%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types => Ryujinx.Horizon/Sdk/Hid}/GamepadInput.cs (74%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/HidVector.cs (70%) create mode 100644 src/Ryujinx.Horizon/Sdk/Hid/IHidDebugServer.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Hid/IHidbusServer.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Hid/IHidbusSystemServer.cs rename src/{Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types => Ryujinx.Horizon/Sdk/Hid}/JoystickPosition.cs (71%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types => Ryujinx.Horizon/Sdk/Hid}/KeyboardInput.cs (73%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/Npad/BusHandle.cs (87%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/Npad/BusType.cs (75%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/Npad/ControllerKeys.cs (96%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/Npad/ControllerType.cs (89%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/Npad/NpadColor.cs (97%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidServer/Types => Ryujinx.Horizon/Sdk/Hid}/Npad/NpadHandheldActivationMode.cs (72%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/Npad/NpadIdType.cs (86%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidServer/Types => Ryujinx.Horizon/Sdk/Hid}/Npad/NpadJoyDeviceType.cs (66%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/Npad/NpadStyleIndex.cs (84%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/Npad/PlayerIndex.cs (88%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/NpadJoyHoldType.cs (63%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Common/AnalogStickState.cs (57%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Common/AtomicStorage.cs (89%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Common/ISampledDataStruct.cs (97%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Common/RingLifo.cs (98%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/DebugPad/DebugPadAttribute.cs (64%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/DebugPad/DebugPadButton.cs (85%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/DebugPad/DebugPadState.cs (73%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Keyboard/KeyboardKey.cs (90%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Keyboard/KeyboardKeyShift.cs (97%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Keyboard/KeyboardModifier.cs (84%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Keyboard/KeyboardState.cs (67%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Mouse/MouseAttribute.cs (70%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Mouse/MouseButton.cs (76%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Mouse/MouseState.cs (77%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/DeviceType.cs (90%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadAttribute.cs (81%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadBatteryLevel.cs (68%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadButton.cs (93%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadColorAttribute.cs (62%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadCommonState.cs (76%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadFullKeyColorState.cs (72%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadGcTriggerState.cs (73%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadInternalState.cs (96%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadJoyAssignmentMode.cs (57%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadJoyColorState.cs (77%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadLarkType.cs (63%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadLuciaType.cs (58%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadState.cs (85%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadStyleTag.cs (96%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadSystemButtonProperties.cs (72%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/NpadSystemProperties.cs (90%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/SixAxisSensorAttribute.cs (72%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/Npad/SixAxisSensorState.cs (80%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/SharedMemory.cs (78%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/TouchScreen/TouchAttribute.cs (67%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/TouchScreen/TouchScreenState.cs (71%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Types => Ryujinx.Horizon/Sdk/Hid}/SharedMemory/TouchScreen/TouchState.cs (88%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidServer/Types => Ryujinx.Horizon/Sdk/Hid}/SixAxis/AccelerometerParameters.cs (71%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidServer/Types => Ryujinx.Horizon/Sdk/Hid}/SixAxis/GyroscopeZeroDriftMode.cs (71%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidServer/Types => Ryujinx.Horizon/Sdk/Hid}/SixAxis/SensorFusionParameters.cs (74%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types => Ryujinx.Horizon/Sdk/Hid}/SixAxisInput.cs (78%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types => Ryujinx.Horizon/Sdk/Hid}/TouchPoint.cs (67%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidServer/Types => Ryujinx.Horizon/Sdk/Hid}/Vibration/VibrationDeviceHandle.cs (80%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidServer/Types => Ryujinx.Horizon/Sdk/Hid}/Vibration/VibrationDevicePosition.cs (69%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidServer/Types => Ryujinx.Horizon/Sdk/Hid}/Vibration/VibrationDeviceType.cs (71%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidServer/Types => Ryujinx.Horizon/Sdk/Hid}/Vibration/VibrationDeviceValue.cs (77%) rename src/{Ryujinx.HLE/HOS/Services/Hid/HidServer/Types => Ryujinx.Horizon/Sdk/Hid}/Vibration/VibrationValue.cs (95%) create mode 100644 src/Ryujinx.Horizon/Sdk/Irsensor/IIrSensorServer.cs rename src/{Ryujinx.HLE/HOS/Services/Hid/Irs/Types => Ryujinx.Horizon/Sdk/Irsensor}/ImageTransferProcessorState.cs (83%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Irs/Types => Ryujinx.Horizon/Sdk/Irsensor}/IrCameraHandle.cs (82%) rename src/{Ryujinx.HLE/HOS/Services/Hid/Irs/Types => Ryujinx.Horizon/Sdk/Irsensor}/PackedClusteringProcessorConfig.cs (88%) create mode 100644 src/Ryujinx.Horizon/Sdk/Irsensor/PackedFunctionLevel.cs rename src/{Ryujinx.HLE/HOS/Services/Hid/Irs/Types => Ryujinx.Horizon/Sdk/Irsensor}/PackedImageTransferProcessorConfig.cs (82%) create mode 100644 src/Ryujinx.Horizon/Sdk/Irsensor/PackedImageTransferProcessorExConfig.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Irsensor/PackedIrLedProcessorConfig.cs create mode 100644 src/Ryujinx.Horizon/Sdk/Irsensor/PackedMcuVersion.cs rename src/{Ryujinx.HLE/HOS/Services/Hid/Irs/Types => Ryujinx.Horizon/Sdk/Irsensor}/PackedMomentProcessorConfig.cs (87%) create mode 100644 src/Ryujinx.Horizon/Sdk/Irsensor/PackedPointingProcessorConfig.cs rename src/{Ryujinx.HLE/HOS/Services/Hid/Irs/Types => Ryujinx.Horizon/Sdk/Irsensor}/PackedTeraPluginProcessorConfig.cs (74%) diff --git a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerApplet.cs b/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerApplet.cs index 5ec9d4b08..bc3090aac 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerApplet.cs +++ b/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerApplet.cs @@ -2,7 +2,7 @@ using Ryujinx.Common.Logging; using Ryujinx.Common.Memory; using Ryujinx.HLE.HOS.Services.Am.AppletAE; using Ryujinx.HLE.HOS.Services.Hid; -using Ryujinx.HLE.HOS.Services.Hid.Types; +using Ryujinx.Horizon.Sdk.Hid.Npad; using System; using System.IO; using System.Runtime.CompilerServices; diff --git a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerAppletUIArgs.cs b/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerAppletUIArgs.cs index 10cba58ba..3038457ba 100644 --- a/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerAppletUIArgs.cs +++ b/src/Ryujinx.HLE/HOS/Applets/Controller/ControllerAppletUIArgs.cs @@ -1,4 +1,5 @@ using Ryujinx.HLE.HOS.Services.Hid; +using Ryujinx.Horizon.Sdk.Hid.Npad; using System.Collections.Generic; namespace Ryujinx.HLE.HOS.Applets diff --git a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs index 0462a5b00..0402d6c5f 100644 --- a/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs +++ b/src/Ryujinx.HLE/HOS/Applets/SoftwareKeyboard/SoftwareKeyboardApplet.cs @@ -3,7 +3,6 @@ using Ryujinx.Common.Configuration.Hid; using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Applets.SoftwareKeyboard; using Ryujinx.HLE.HOS.Services.Am.AppletAE; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad; using Ryujinx.HLE.UI; using Ryujinx.HLE.UI.Input; using Ryujinx.Memory; diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Hid.cs b/src/Ryujinx.HLE/HOS/Services/Hid/Hid.cs index dbcbe1870..ff408f205 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Hid.cs +++ b/src/Ryujinx.HLE/HOS/Services/Hid/Hid.cs @@ -3,15 +3,12 @@ using Ryujinx.Common.Configuration.Hid; using Ryujinx.Common.Memory; using Ryujinx.HLE.Exceptions; using Ryujinx.HLE.HOS.Kernel.Memory; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.DebugPad; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Keyboard; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Mouse; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.TouchScreen; +using Ryujinx.Horizon.Sdk.Hid; +using Ryujinx.Horizon.Sdk.Hid.Npad; using System.Collections.Generic; using System.Runtime.CompilerServices; +using ControllerType = Ryujinx.Horizon.Sdk.Hid.Npad.ControllerType; +using PlayerIndex = Ryujinx.Horizon.Sdk.Hid.Npad.PlayerIndex; namespace Ryujinx.HLE.HOS.Services.Hid { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs index 6b1d7af5d..a01763183 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs +++ b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/DebugPadDevice.cs @@ -1,6 +1,3 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.DebugPad; - namespace Ryujinx.HLE.HOS.Services.Hid { public class DebugPadDevice : BaseDevice diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/KeyboardDevice.cs b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/KeyboardDevice.cs index 0e3630f26..800729a3f 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/KeyboardDevice.cs +++ b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/KeyboardDevice.cs @@ -1,5 +1,4 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Keyboard; +using Ryujinx.Horizon.Sdk.Hid; using System; namespace Ryujinx.HLE.HOS.Services.Hid diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs index 2e62d206b..7c7ae1d29 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs +++ b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/MouseDevice.cs @@ -1,6 +1,3 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Mouse; - namespace Ryujinx.HLE.HOS.Services.Hid { public class MouseDevice : BaseDevice diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/NpadDevices.cs b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/NpadDevices.cs index 86c6a825f..f711fbde2 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/NpadDevices.cs +++ b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/NpadDevices.cs @@ -1,9 +1,9 @@ using Ryujinx.Common; using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Kernel.Threading; -using Ryujinx.HLE.HOS.Services.Hid.Types; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad; +using Ryujinx.Horizon.Sdk.Hid; +using Ryujinx.Horizon.Sdk.Hid.Npad; +using Ryujinx.Horizon.Sdk.Hid.Vibration; using System; using System.Collections.Concurrent; using System.Collections.Generic; diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/TouchDevice.cs b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/TouchDevice.cs index 35ac1a16f..ae3a3cf5c 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/TouchDevice.cs +++ b/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/TouchDevice.cs @@ -1,5 +1,4 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.TouchScreen; +using Ryujinx.Horizon.Sdk.Hid; using System; namespace Ryujinx.HLE.HOS.Services.Hid diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/HidUtils.cs b/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/HidUtils.cs index 8e2e854fb..209b58ee3 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/HidUtils.cs +++ b/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/HidUtils.cs @@ -1,3 +1,4 @@ +using Ryujinx.Horizon.Sdk.Hid.Npad; using System; namespace Ryujinx.HLE.HOS.Services.Hid.HidServer diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs b/src/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs index e3f505f37..2313af570 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs +++ b/src/Ryujinx.HLE/HOS/Services/Hid/IHidServer.cs @@ -3,9 +3,11 @@ using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Kernel.Threading; using Ryujinx.HLE.HOS.Services.Hid.HidServer; -using Ryujinx.HLE.HOS.Services.Hid.Types; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad; using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Hid; +using Ryujinx.Horizon.Sdk.Hid.Npad; +using Ryujinx.Horizon.Sdk.Hid.SixAxis; +using Ryujinx.Horizon.Sdk.Hid.Vibration; using System; using System.Collections.Generic; using System.Runtime.InteropServices; diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/IHidSystemServer.cs b/src/Ryujinx.HLE/HOS/Services/Hid/IHidSystemServer.cs index 0b4eba948..98a9d022c 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/IHidSystemServer.cs +++ b/src/Ryujinx.HLE/HOS/Services/Hid/IHidSystemServer.cs @@ -1,6 +1,6 @@ using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Services.Hid.HidServer; -using Ryujinx.HLE.HOS.Services.Hid.Types; +using Ryujinx.Horizon.Sdk.Hid.Npad; namespace Ryujinx.HLE.HOS.Services.Hid { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs b/src/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs index d6531cc18..936e3c40a 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs +++ b/src/Ryujinx.HLE/HOS/Services/Hid/IHidbusServer.cs @@ -1,5 +1,6 @@ using Ryujinx.Common; using Ryujinx.Common.Logging; +using Ryujinx.Horizon.Sdk.Hid.Npad; namespace Ryujinx.HLE.HOS.Services.Hid { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorServer.cs b/src/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorServer.cs index a13e77e72..ff0bb4401 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorServer.cs +++ b/src/Ryujinx.HLE/HOS/Services/Hid/Irs/IIrSensorServer.cs @@ -2,8 +2,8 @@ using Ryujinx.Common; using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Ipc; using Ryujinx.HLE.HOS.Services.Hid.HidServer; -using Ryujinx.HLE.HOS.Services.Hid.Irs.Types; using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Hid.Npad; using System; namespace Ryujinx.HLE.HOS.Services.Hid.Irs diff --git a/src/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/INfp.cs b/src/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/INfp.cs index 20f67a4ef..4cec5c56f 100644 --- a/src/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/INfp.cs +++ b/src/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/INfp.cs @@ -7,6 +7,7 @@ using Ryujinx.HLE.HOS.Services.Hid; using Ryujinx.HLE.HOS.Services.Hid.HidServer; using Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager; using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Hid.Npad; using System; using System.Buffers.Binary; using System.Globalization; diff --git a/src/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpDevice.cs b/src/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpDevice.cs index 3320238a8..f501d414d 100644 --- a/src/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpDevice.cs +++ b/src/Ryujinx.HLE/HOS/Services/Nfc/Nfp/NfpManager/Types/NfpDevice.cs @@ -1,5 +1,6 @@ using Ryujinx.HLE.HOS.Kernel.Threading; using Ryujinx.HLE.HOS.Services.Hid; +using Ryujinx.Horizon.Sdk.Hid.Npad; namespace Ryujinx.HLE.HOS.Services.Nfc.Nfp.NfpManager { diff --git a/src/Ryujinx.HLE/HOS/Tamper/AtmosphereProgram.cs b/src/Ryujinx.HLE/HOS/Tamper/AtmosphereProgram.cs index 8171d2177..74428a111 100644 --- a/src/Ryujinx.HLE/HOS/Tamper/AtmosphereProgram.cs +++ b/src/Ryujinx.HLE/HOS/Tamper/AtmosphereProgram.cs @@ -1,5 +1,6 @@ using Ryujinx.HLE.HOS.Services.Hid; using Ryujinx.HLE.HOS.Tamper.Operations; +using Ryujinx.Horizon.Sdk.Hid.Npad; namespace Ryujinx.HLE.HOS.Tamper { diff --git a/src/Ryujinx.HLE/HOS/Tamper/ITamperProgram.cs b/src/Ryujinx.HLE/HOS/Tamper/ITamperProgram.cs index 8458d95d6..65c3d7797 100644 --- a/src/Ryujinx.HLE/HOS/Tamper/ITamperProgram.cs +++ b/src/Ryujinx.HLE/HOS/Tamper/ITamperProgram.cs @@ -1,4 +1,5 @@ using Ryujinx.HLE.HOS.Services.Hid; +using Ryujinx.Horizon.Sdk.Hid.Npad; namespace Ryujinx.HLE.HOS.Tamper { diff --git a/src/Ryujinx.HLE/HOS/TamperMachine.cs b/src/Ryujinx.HLE/HOS/TamperMachine.cs index 609221535..cf128c6e0 100644 --- a/src/Ryujinx.HLE/HOS/TamperMachine.cs +++ b/src/Ryujinx.HLE/HOS/TamperMachine.cs @@ -3,6 +3,8 @@ using Ryujinx.HLE.HOS.Kernel; using Ryujinx.HLE.HOS.Kernel.Process; using Ryujinx.HLE.HOS.Services.Hid; using Ryujinx.HLE.HOS.Tamper; +using Ryujinx.Horizon.Sdk.Hid; +using Ryujinx.Horizon.Sdk.Hid.Npad; using System; using System.Collections.Concurrent; using System.Collections.Generic; diff --git a/src/Ryujinx.HLE/UI/Input/NpadButtonHandler.cs b/src/Ryujinx.HLE/UI/Input/NpadButtonHandler.cs index 73c306614..62a1997a7 100644 --- a/src/Ryujinx.HLE/UI/Input/NpadButtonHandler.cs +++ b/src/Ryujinx.HLE/UI/Input/NpadButtonHandler.cs @@ -1,5 +1,3 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad; - namespace Ryujinx.HLE.UI.Input { delegate void NpadButtonHandler(int npadIndex, NpadButton button); diff --git a/src/Ryujinx.HLE/UI/Input/NpadReader.cs b/src/Ryujinx.HLE/UI/Input/NpadReader.cs index 8276d6160..5b501ed31 100644 --- a/src/Ryujinx.HLE/UI/Input/NpadReader.cs +++ b/src/Ryujinx.HLE/UI/Input/NpadReader.cs @@ -1,6 +1,3 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad; - namespace Ryujinx.HLE.UI.Input { /// diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/AppletFooterUiType.cs b/src/Ryujinx.Horizon/Sdk/Hid/AppletFooterUiType.cs similarity index 92% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/AppletFooterUiType.cs rename to src/Ryujinx.Horizon/Sdk/Hid/AppletFooterUiType.cs index b9b0c5f99..4a5ec5323 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/AppletFooterUiType.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/AppletFooterUiType.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types +namespace Ryujinx.Horizon.Sdk.Hid { [Flags] enum AppletFooterUiType : byte diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/ControllerConfig.cs b/src/Ryujinx.Horizon/Sdk/Hid/ControllerConfig.cs similarity index 63% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/ControllerConfig.cs rename to src/Ryujinx.Horizon/Sdk/Hid/ControllerConfig.cs index cba5c7b1d..7afb7f3d4 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/ControllerConfig.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/ControllerConfig.cs @@ -1,4 +1,6 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +using Ryujinx.Horizon.Sdk.Hid.Npad; + +namespace Ryujinx.Horizon.Sdk.Hid { public struct ControllerConfig { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/GamepadInput.cs b/src/Ryujinx.Horizon/Sdk/Hid/GamepadInput.cs similarity index 74% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/GamepadInput.cs rename to src/Ryujinx.Horizon/Sdk/Hid/GamepadInput.cs index 452901a08..f7ed1c529 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/GamepadInput.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/GamepadInput.cs @@ -1,4 +1,6 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +using Ryujinx.Horizon.Sdk.Hid.Npad; + +namespace Ryujinx.Horizon.Sdk.Hid { public struct GamepadInput { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/HidVector.cs b/src/Ryujinx.Horizon/Sdk/Hid/HidVector.cs similarity index 70% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/HidVector.cs rename to src/Ryujinx.Horizon/Sdk/Hid/HidVector.cs index 8d667796a..6d65c0511 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/HidVector.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/HidVector.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid.Types +namespace Ryujinx.Horizon.Sdk.Hid { struct HidVector { diff --git a/src/Ryujinx.Horizon/Sdk/Hid/IHidDebugServer.cs b/src/Ryujinx.Horizon/Sdk/Hid/IHidDebugServer.cs new file mode 100644 index 000000000..311832ab9 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Hid/IHidDebugServer.cs @@ -0,0 +1,128 @@ +using Ryujinx.Horizon.Sdk.Sf; + +namespace Ryujinx.Horizon.Sdk.Hid +{ + interface IHidDebugServer : IServiceObject + { + // Result DeactivateDebugPad(); + // Result SetDebugPadAutoPilotState(DebugPadAutoPilotState arg0); + // Result UnsetDebugPadAutoPilotState(); + // Result DeactivateTouchScreen(); + // Result SetTouchScreenAutoPilotState(ReadOnlySpan arg0); + // Result UnsetTouchScreenAutoPilotState(); + // Result GetTouchScreenConfiguration(out TouchScreenConfigurationForNx arg0, AppletResourceUserId arg1, ulong pid); + // Result ProcessTouchScreenAutoTune(); + // Result ForceStopTouchScreenManagement(); + // Result ForceRestartTouchScreenManagement(AppletResourceUserId arg0, int arg1, ulong pid); + // Result IsTouchScreenManaged(out bool arg0); + // Result DeactivateMouse(); + // Result SetMouseAutoPilotState(MouseAutoPilotState arg0); + // Result UnsetMouseAutoPilotState(); + // Result DeactivateKeyboard(); + // Result SetKeyboardAutoPilotState(KeyboardAutoPilotState arg0); + // Result UnsetKeyboardAutoPilotState(); + // Result DeactivateXpad(BasicXpadId arg0); + // Result ClearNpadSystemCommonPolicy(AppletResourceUserId arg0, ulong pid); + // Result DeactivateNpad(AppletResourceUserId arg0, ulong pid); + // Result ForceDisconnectNpad(uint arg0); + // Result DeactivateGesture(); + // Result DeactivateHomeButton(); + // Result SetHomeButtonAutoPilotState(HomeButtonAutoPilotState arg0); + // Result UnsetHomeButtonAutoPilotState(); + // Result DeactivateSleepButton(); + // Result SetSleepButtonAutoPilotState(SleepButtonAutoPilotState arg0); + // Result UnsetSleepButtonAutoPilotState(); + // Result DeactivateCaptureButton(); + // Result SetCaptureButtonAutoPilotState(CaptureButtonAutoPilotState arg0); + // Result UnsetCaptureButtonAutoPilotState(); + // Result SetShiftAccelerometerCalibrationValue(SixAxisSensorHandle arg0, AppletResourceUserId arg1, float arg2, float arg3, ulong pid); + // Result GetShiftAccelerometerCalibrationValue(out float arg0, out float arg1, SixAxisSensorHandle arg2, AppletResourceUserId arg3, ulong pid); + // Result SetShiftGyroscopeCalibrationValue(SixAxisSensorHandle arg0, AppletResourceUserId arg1, float arg2, float arg3, ulong pid); + // Result GetShiftGyroscopeCalibrationValue(out float arg0, out float arg1, SixAxisSensorHandle arg2, AppletResourceUserId arg3, ulong pid); + // Result DeactivateConsoleSixAxisSensor(); + // Result GetConsoleSixAxisSensorSamplingFrequency(out long arg0, AppletResourceUserId arg1, ulong pid); + // Result DeactivateSevenSixAxisSensor(); + // Result GetConsoleSixAxisSensorCountStates(out int arg0, Span arg1, AppletResourceUserId arg2, ulong pid); + // Result GetAccelerometerFsr(out AccelerometerFsr arg0, AppletResourceUserId arg1, ulong pid); + // Result SetAccelerometerFsr(AccelerometerFsr arg0, AppletResourceUserId arg1, ulong pid); + // Result GetAccelerometerOdr(out AccelerometerOdr arg0, AppletResourceUserId arg1, ulong pid); + // Result SetAccelerometerOdr(AccelerometerOdr arg0, AppletResourceUserId arg1, ulong pid); + // Result GetGyroscopeFsr(out GyroscopeFsr arg0, AppletResourceUserId arg1, ulong pid); + // Result SetGyroscopeFsr(GyroscopeFsr arg0, AppletResourceUserId arg1, ulong pid); + // Result GetGyroscopeOdr(out GyroscopeOdr arg0, AppletResourceUserId arg1, ulong pid); + // Result SetGyroscopeOdr(GyroscopeOdr arg0, AppletResourceUserId arg1, ulong pid); + // Result GetWhoAmI(out WhoAmIValue arg0, AppletResourceUserId arg1, ulong pid); + // Result ActivateFirmwareUpdate(); + // Result DeactivateFirmwareUpdate(); + // Result StartFirmwareUpdate(UniquePadId arg0); + // Result GetFirmwareUpdateStage(out long arg0, out long arg1); + // Result GetFirmwareVersion(out FirmwareVersion arg0, uint arg1, DeviceType arg2); + // Result GetDestinationFirmwareVersion(out FirmwareVersion arg0, uint arg1, DeviceType arg2); + // Result DiscardFirmwareInfoCacheForRevert(); + // Result StartFirmwareUpdateForRevert(UniquePadId arg0); + // Result GetAvailableFirmwareVersionForRevert(out FirmwareVersion arg0, UniquePadId arg1); + // Result IsFirmwareUpdatingDevice(out bool arg0, UniquePadId arg1); + // Result StartFirmwareUpdateIndividual(out FirmwareUpdateDeviceHandle arg0, UniquePadId arg1, long arg2, int arg3, ulong arg4); + // Result SetUsbFirmwareForceUpdateEnabled(bool arg0); + // Result SetAllKuinaDevicesToFirmwareUpdateMode(); + // Result UpdateControllerColor(Unorm8x4 arg0, Unorm8x4 arg1, UniquePadId arg2); + // Result ConnectUsbPadsAsync(); + // Result DisconnectUsbPadsAsync(); + // Result UpdateDesignInfo(Unorm8x4 arg0, Unorm8x4 arg1, Unorm8x4 arg2, Unorm8x4 arg3, uint arg4, UniquePadId arg5); + // Result GetUniquePadDriverState(out PadRawState arg0, UniquePadId arg1); + // Result GetSixAxisSensorDriverStates(out long arg0, Span arg1, UniquePadId arg2); + // Result GetRxPacketHistory(out JoyConFormatPacketRxHistory arg0, UniquePadId arg1); + // Result AcquireOperationEventHandle(out int arg0, UniquePadId arg1); + // Result ReadSerialFlash(uint arg0, int arg1, ulong arg2, UniquePadId arg3); + // Result WriteSerialFlash(uint arg0, int arg1, ulong arg2, ulong arg3, UniquePadId arg4); + // Result GetOperationResult(UniquePadId arg0); + // Result EnableShipmentMode(UniquePadId arg0); + // Result ClearPairingInfo(UniquePadId arg0); + // Result GetUniquePadDeviceTypeSetInternal(out DeviceType arg0, UniquePadId arg1); + // Result EnableAnalogStickPower(bool arg0, UniquePadId arg1); + // Result RequestKuinaUartClockCal(UniquePadId arg0); + // Result GetKuinaUartClockCal(out byte arg0, UniquePadId arg1); + // Result SetKuinaUartClockTrim(UniquePadId arg0, byte arg1); + // Result KuinaLoopbackTest(UniquePadId arg0); + // Result RequestBatteryVoltage(UniquePadId arg0); + // Result GetBatteryVoltage(out ushort arg0, UniquePadId arg1); + // Result GetUniquePadPowerInfo(out PowerInfo arg0, UniquePadId arg1); + // Result RebootUniquePad(UniquePadId arg0); + // Result RequestKuinaFirmwareVersion(UniquePadId arg0); + // Result GetKuinaFirmwareVersion(out UsbFirmwareVersion arg0, UniquePadId arg1); + // Result GetVidPid(out ushort arg0, out ushort arg1, UniquePadId arg2); + // Result GetAnalogStickCalibrationValue(out AnalogStickCalibrationValue arg0, UniquePadId arg1, AnalogStickDeviceType arg2); + // Result GetUniquePadIdsFull(out int arg0, Span arg1); + // Result ConnectUniquePad(UniquePadId arg0); + // Result IsVirtual(out bool arg0, out bool arg1, UniquePadId arg2); + // Result GetAnalogStickModuleParam(out AnalogStickModuleParam arg0, UniquePadId arg1, AnalogStickDeviceType arg2); + // Result UnsetAllAutoPilotVirtualPadState(); + // Result AttachHdlsWorkBuffer(out HdlsSessionId arg0, int arg1, ulong arg2); + // Result ReleaseHdlsWorkBuffer(HdlsSessionId arg0); + // Result DumpHdlsNpadAssignmentState(HdlsSessionId arg0); + // Result DumpHdlsStates(HdlsSessionId arg0); + // Result ApplyHdlsNpadAssignmentState(HdlsSessionId arg0, bool arg1); + // Result ApplyHdlsStateList(HdlsSessionId arg0); + // Result AttachHdlsVirtualDevice(out HdlsHandle arg0, HdlsDeviceInfo arg1); + // Result DetachHdlsVirtualDevice(HdlsHandle arg0); + // Result SetHdlsState(HdlsHandle arg0, HdlsState arg1); + // Result AddRegisteredDevice(RegisteredDevice arg0); + // Result DisableExternalMcuOnNxDevice(bool arg0); + // Result DisableRailDeviceFiltering(bool arg0); + // Result EnableWiredPairing(bool arg0); + // Result EnableShipmentModeAutoClear(bool arg0); + // Result SetRailEnabled(bool arg0); + // Result SetFactoryInt(bool arg0, UniquePadId arg1); + // Result IsFactoryBootEnabled(out bool arg0, UniquePadId arg1); + // Result SetAnalogStickModelDataTemporarily(AnalogStickModelData arg0, UniquePadId arg1, int arg2); + // Result GetAnalogStickModelData(out AnalogStickModelData arg0, out bool arg1, UniquePadId arg2, int arg3); + // Result ResetAnalogStickModelData(UniquePadId arg0, int arg1); + // Result ConvertPadState(out PadState arg0, PadState arg1, UniquePadId arg2); + // Result AddButtonPlayData(ButtonPlayData arg0, UniquePadId arg1); + // Result StartButtonPlayData(UniquePadId arg0); + // Result StopButtonPlayData(UniquePadId arg0); + // Result DeactivateDigitizer(); + // Result SetDigitizerAutoPilotState(DigitizerAutoPilotState arg0); + // Result UnsetDigitizerAutoPilotState(); + } +} diff --git a/src/Ryujinx.Horizon/Sdk/Hid/IHidbusServer.cs b/src/Ryujinx.Horizon/Sdk/Hid/IHidbusServer.cs new file mode 100644 index 000000000..02d07fc89 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Hid/IHidbusServer.cs @@ -0,0 +1,25 @@ +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Applet; +using Ryujinx.Horizon.Sdk.Hid.Npad; +using Ryujinx.Horizon.Sdk.Sf; +using System; + +namespace Ryujinx.Horizon.Sdk.Hid +{ + interface IHidbusServer : IServiceObject + { + Result GetBusHandle(out BusHandle handle, out bool hasHandle, uint npadIdType, ulong busType, AppletResourceUserId resourceUserId); + Result IsExternalDeviceConnected(out bool isAttached, BusHandle handle); + Result Initialize(BusHandle handle, AppletResourceUserId resourceUserId); + Result Finalize(BusHandle handle, AppletResourceUserId resourceUserId); + Result EnableExternalDevice(BusHandle handle, bool isEnabled, ulong version, AppletResourceUserId resourceUserId); + Result GetExternalDeviceId(out uint deviceId, BusHandle handle); + Result SendCommandAsync(ReadOnlySpan buffer, BusHandle handle); + Result GetSendCommandAsyncResult(out uint outSize, Span buffer, BusHandle handle); + Result SetEventForSendCommandAsyncResult(out int eventHandle, BusHandle handle); + Result GetSharedMemoryHandle(out int sharedMemoryHandle); + Result EnableJoyPollingReceiveMode(ReadOnlySpan buffer, int transferMemoryHandle, uint size, uint joyPollingMode, BusHandle handle); + Result DisableJoyPollingReceiveMode(BusHandle handle); + Result SetStatusManagerType(uint statusManagerType); + } +} diff --git a/src/Ryujinx.Horizon/Sdk/Hid/IHidbusSystemServer.cs b/src/Ryujinx.Horizon/Sdk/Hid/IHidbusSystemServer.cs new file mode 100644 index 000000000..c4b7a0651 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Hid/IHidbusSystemServer.cs @@ -0,0 +1,13 @@ +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Applet; +using Ryujinx.Horizon.Sdk.Sf; + +namespace Ryujinx.Horizon.Sdk.Hid +{ + interface IHidbusSystemServer : IServiceObject + { + Result SetAppletResourceUserId(AppletResourceUserId resourceUserId); + Result RegisterAppletResourceUserId(AppletResourceUserId resourceUserId, int arg1); + Result UnregisterAppletResourceUserId(AppletResourceUserId resourceUserId); + } +} diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/JoystickPosition.cs b/src/Ryujinx.Horizon/Sdk/Hid/JoystickPosition.cs similarity index 71% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/JoystickPosition.cs rename to src/Ryujinx.Horizon/Sdk/Hid/JoystickPosition.cs index 47be8d413..4b06eb7fd 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/JoystickPosition.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/JoystickPosition.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid { public struct JoystickPosition { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/KeyboardInput.cs b/src/Ryujinx.Horizon/Sdk/Hid/KeyboardInput.cs similarity index 73% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/KeyboardInput.cs rename to src/Ryujinx.Horizon/Sdk/Hid/KeyboardInput.cs index 26fe980f5..356c66e1d 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/KeyboardInput.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/KeyboardInput.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid { public struct KeyboardInput { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/BusHandle.cs b/src/Ryujinx.Horizon/Sdk/Hid/Npad/BusHandle.cs similarity index 87% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/BusHandle.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Npad/BusHandle.cs index 8e061351e..c1c849117 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/BusHandle.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Npad/BusHandle.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Npad { [StructLayout(LayoutKind.Sequential)] struct BusHandle diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/BusType.cs b/src/Ryujinx.Horizon/Sdk/Hid/Npad/BusType.cs similarity index 75% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/BusType.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Npad/BusType.cs index 6c70ac25c..9bb3b2a32 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/BusType.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Npad/BusType.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Npad { public enum BusType : long { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/ControllerKeys.cs b/src/Ryujinx.Horizon/Sdk/Hid/Npad/ControllerKeys.cs similarity index 96% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/ControllerKeys.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Npad/ControllerKeys.cs index b43381e6d..cc9d5bfd8 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/ControllerKeys.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Npad/ControllerKeys.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Npad { [Flags] public enum ControllerKeys : long diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/ControllerType.cs b/src/Ryujinx.Horizon/Sdk/Hid/Npad/ControllerType.cs similarity index 89% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/ControllerType.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Npad/ControllerType.cs index 1f5da3173..4d7200e4f 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/ControllerType.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Npad/ControllerType.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Npad { [Flags] public enum ControllerType diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/NpadColor.cs b/src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadColor.cs similarity index 97% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/NpadColor.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadColor.cs index 010cffbd2..d02cafb03 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/NpadColor.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadColor.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Npad { public enum NpadColor : uint { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Npad/NpadHandheldActivationMode.cs b/src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadHandheldActivationMode.cs similarity index 72% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Npad/NpadHandheldActivationMode.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadHandheldActivationMode.cs index ba56e93cb..c8e00597a 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Npad/NpadHandheldActivationMode.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadHandheldActivationMode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Npad { public enum NpadHandheldActivationMode { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/NpadIdType.cs b/src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadIdType.cs similarity index 86% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/NpadIdType.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadIdType.cs index 8f08481cd..f4bc91c12 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/NpadIdType.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadIdType.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Npad { public enum NpadIdType { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Npad/NpadJoyDeviceType.cs b/src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadJoyDeviceType.cs similarity index 66% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Npad/NpadJoyDeviceType.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadJoyDeviceType.cs index ac0bb3575..4176d0962 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Npad/NpadJoyDeviceType.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadJoyDeviceType.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Npad { public enum NpadJoyDeviceType { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/NpadStyleIndex.cs b/src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadStyleIndex.cs similarity index 84% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/NpadStyleIndex.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadStyleIndex.cs index c42a5bc56..037949835 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/NpadStyleIndex.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Npad/NpadStyleIndex.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Npad { public enum NpadStyleIndex : byte { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/PlayerIndex.cs b/src/Ryujinx.Horizon/Sdk/Hid/Npad/PlayerIndex.cs similarity index 88% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/PlayerIndex.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Npad/PlayerIndex.cs index d68b6d938..38db243e6 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/Npad/PlayerIndex.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Npad/PlayerIndex.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Npad { public enum PlayerIndex { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/NpadJoyHoldType.cs b/src/Ryujinx.Horizon/Sdk/Hid/NpadJoyHoldType.cs similarity index 63% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/NpadJoyHoldType.cs rename to src/Ryujinx.Horizon/Sdk/Hid/NpadJoyHoldType.cs index cd61dc92c..e8d7dffc3 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/NpadJoyHoldType.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/NpadJoyHoldType.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid.Types +namespace Ryujinx.Horizon.Sdk.Hid { enum NpadJoyHoldType { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Common/AnalogStickState.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Common/AnalogStickState.cs similarity index 57% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Common/AnalogStickState.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Common/AnalogStickState.cs index b9af211c1..c5a9dd7e2 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Common/AnalogStickState.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Common/AnalogStickState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Common { struct AnalogStickState { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Common/AtomicStorage.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Common/AtomicStorage.cs similarity index 89% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Common/AtomicStorage.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Common/AtomicStorage.cs index c9f59ce0f..c9da845f7 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Common/AtomicStorage.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Common/AtomicStorage.cs @@ -1,6 +1,6 @@ using System.Threading; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Common { struct AtomicStorage where T : unmanaged, ISampledDataStruct { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Common/ISampledDataStruct.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Common/ISampledDataStruct.cs similarity index 97% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Common/ISampledDataStruct.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Common/ISampledDataStruct.cs index 312075bc4..1bde91c5f 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Common/ISampledDataStruct.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Common/ISampledDataStruct.cs @@ -2,7 +2,7 @@ using System; using System.Buffers.Binary; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Common { /// /// This is a "marker interface" to add some compile-time safety to a convention-based optimization. diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Common/RingLifo.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Common/RingLifo.cs similarity index 98% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Common/RingLifo.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Common/RingLifo.cs index 99f2f59e4..35069a862 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Common/RingLifo.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Common/RingLifo.cs @@ -3,7 +3,7 @@ using System; using System.Runtime.CompilerServices; using System.Threading; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Common { struct RingLifo where T : unmanaged, ISampledDataStruct { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/DebugPad/DebugPadAttribute.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/DebugPad/DebugPadAttribute.cs similarity index 64% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/DebugPad/DebugPadAttribute.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/DebugPad/DebugPadAttribute.cs index dadaf6b29..2e5e3fc95 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/DebugPad/DebugPadAttribute.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/DebugPad/DebugPadAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.DebugPad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.DebugPad { [Flags] enum DebugPadAttribute : uint diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/DebugPad/DebugPadButton.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/DebugPad/DebugPadButton.cs similarity index 85% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/DebugPad/DebugPadButton.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/DebugPad/DebugPadButton.cs index b0bb9b959..719090165 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/DebugPad/DebugPadButton.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/DebugPad/DebugPadButton.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.DebugPad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.DebugPad { [Flags] enum DebugPadButton : uint diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/DebugPad/DebugPadState.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/DebugPad/DebugPadState.cs similarity index 73% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/DebugPad/DebugPadState.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/DebugPad/DebugPadState.cs index f26440c4b..d5ce06771 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/DebugPad/DebugPadState.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/DebugPad/DebugPadState.cs @@ -1,7 +1,7 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.Common; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.DebugPad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.DebugPad { [StructLayout(LayoutKind.Sequential, Pack = 1)] struct DebugPadState : ISampledDataStruct diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Keyboard/KeyboardKey.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Keyboard/KeyboardKey.cs similarity index 90% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Keyboard/KeyboardKey.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Keyboard/KeyboardKey.cs index 7f75bc3f9..06dce1ec7 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Keyboard/KeyboardKey.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Keyboard/KeyboardKey.cs @@ -1,6 +1,6 @@ using Ryujinx.Common.Memory; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Keyboard +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Keyboard { struct KeyboardKey { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Keyboard/KeyboardKeyShift.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Keyboard/KeyboardKeyShift.cs similarity index 97% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Keyboard/KeyboardKeyShift.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Keyboard/KeyboardKeyShift.cs index c19b5e614..36be39190 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Keyboard/KeyboardKeyShift.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Keyboard/KeyboardKeyShift.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Keyboard +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Keyboard { enum KeyboardKeyShift { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Keyboard/KeyboardModifier.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Keyboard/KeyboardModifier.cs similarity index 84% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Keyboard/KeyboardModifier.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Keyboard/KeyboardModifier.cs index 890daa0d0..3cf338388 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Keyboard/KeyboardModifier.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Keyboard/KeyboardModifier.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Keyboard +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Keyboard { [Flags] enum KeyboardModifier : ulong diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Keyboard/KeyboardState.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Keyboard/KeyboardState.cs similarity index 67% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Keyboard/KeyboardState.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Keyboard/KeyboardState.cs index 3f7d9409d..2623b9963 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Keyboard/KeyboardState.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Keyboard/KeyboardState.cs @@ -1,7 +1,7 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.Common; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Keyboard +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Keyboard { [StructLayout(LayoutKind.Sequential, Pack = 1)] struct KeyboardState : ISampledDataStruct diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Mouse/MouseAttribute.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Mouse/MouseAttribute.cs similarity index 70% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Mouse/MouseAttribute.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Mouse/MouseAttribute.cs index 048dd357c..e3ae92bff 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Mouse/MouseAttribute.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Mouse/MouseAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Mouse +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Mouse { [Flags] enum MouseAttribute : uint diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Mouse/MouseButton.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Mouse/MouseButton.cs similarity index 76% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Mouse/MouseButton.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Mouse/MouseButton.cs index 4a6f73b8b..08d9d557b 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Mouse/MouseButton.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Mouse/MouseButton.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Mouse +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Mouse { [Flags] enum MouseButton : uint diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Mouse/MouseState.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Mouse/MouseState.cs similarity index 77% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Mouse/MouseState.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Mouse/MouseState.cs index 41fe68b8b..985aa7a58 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Mouse/MouseState.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Mouse/MouseState.cs @@ -1,7 +1,7 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.Common; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Mouse +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Mouse { [StructLayout(LayoutKind.Sequential, Pack = 1)] struct MouseState : ISampledDataStruct diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/DeviceType.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/DeviceType.cs similarity index 90% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/DeviceType.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/DeviceType.cs index d56f849a6..0788cfc47 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/DeviceType.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/DeviceType.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { [Flags] enum DeviceType diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadAttribute.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadAttribute.cs similarity index 81% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadAttribute.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadAttribute.cs index 6d7719e82..27a505802 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadAttribute.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { [Flags] enum NpadAttribute : uint diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadBatteryLevel.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadBatteryLevel.cs similarity index 68% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadBatteryLevel.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadBatteryLevel.cs index 7f5b17ff5..de922ec45 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadBatteryLevel.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadBatteryLevel.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { enum NpadBatteryLevel { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadButton.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadButton.cs similarity index 93% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadButton.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadButton.cs index c20db8e0b..b84edaaed 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadButton.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadButton.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { [Flags] enum NpadButton : ulong diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadColorAttribute.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadColorAttribute.cs similarity index 62% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadColorAttribute.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadColorAttribute.cs index e8140459c..e720dcaca 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadColorAttribute.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadColorAttribute.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { enum NpadColorAttribute : uint { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadCommonState.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadCommonState.cs similarity index 76% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadCommonState.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadCommonState.cs index d3caf7170..efe4bfbd8 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadCommonState.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadCommonState.cs @@ -1,7 +1,7 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.Common; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { [StructLayout(LayoutKind.Sequential, Pack = 1)] struct NpadCommonState : ISampledDataStruct diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadFullKeyColorState.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadFullKeyColorState.cs similarity index 72% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadFullKeyColorState.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadFullKeyColorState.cs index 77127c2c2..232219fd1 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadFullKeyColorState.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadFullKeyColorState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { struct NpadFullKeyColorState { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadGcTriggerState.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadGcTriggerState.cs similarity index 73% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadGcTriggerState.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadGcTriggerState.cs index 41e841342..da5dc8ad0 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadGcTriggerState.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadGcTriggerState.cs @@ -1,7 +1,7 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.Common; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { [StructLayout(LayoutKind.Sequential, Pack = 1)] struct NpadGcTriggerState : ISampledDataStruct diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadInternalState.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadInternalState.cs similarity index 96% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadInternalState.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadInternalState.cs index f79a2657e..9c60e031b 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadInternalState.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadInternalState.cs @@ -1,7 +1,7 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.Common; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { struct NpadInternalState { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadJoyAssignmentMode.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadJoyAssignmentMode.cs similarity index 57% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadJoyAssignmentMode.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadJoyAssignmentMode.cs index b8a4623f4..6d0127f21 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadJoyAssignmentMode.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadJoyAssignmentMode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { enum NpadJoyAssignmentMode : uint { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadJoyColorState.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadJoyColorState.cs similarity index 77% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadJoyColorState.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadJoyColorState.cs index 4e00b5aea..3512fb523 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadJoyColorState.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadJoyColorState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { struct NpadJoyColorState { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadLarkType.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadLarkType.cs similarity index 63% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadLarkType.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadLarkType.cs index 013c5fee5..a9a0567c6 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadLarkType.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadLarkType.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { enum NpadLarkType : uint { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadLuciaType.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadLuciaType.cs similarity index 58% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadLuciaType.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadLuciaType.cs index 18756bc34..0a7eb0e87 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadLuciaType.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadLuciaType.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { enum NpadLuciaType { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadState.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadState.cs similarity index 85% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadState.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadState.cs index fb32e716d..05f5bcca9 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadState.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadState.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { [StructLayout(LayoutKind.Sequential, Size = 0x5000)] struct NpadState diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadStyleTag.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadStyleTag.cs similarity index 96% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadStyleTag.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadStyleTag.cs index bf4d91879..c806c6f32 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadStyleTag.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadStyleTag.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { /// /// Nintendo pad style diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadSystemButtonProperties.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadSystemButtonProperties.cs similarity index 72% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadSystemButtonProperties.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadSystemButtonProperties.cs index 6f820ef69..8ff1c12da 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadSystemButtonProperties.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadSystemButtonProperties.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { [Flags] enum NpadSystemButtonProperties : uint diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadSystemProperties.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadSystemProperties.cs similarity index 90% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadSystemProperties.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadSystemProperties.cs index 79110fe44..fa75f6f9c 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/NpadSystemProperties.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/NpadSystemProperties.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { [Flags] enum NpadSystemProperties : ulong diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/SixAxisSensorAttribute.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/SixAxisSensorAttribute.cs similarity index 72% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/SixAxisSensorAttribute.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/SixAxisSensorAttribute.cs index b6e57496c..921f3fc02 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/SixAxisSensorAttribute.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/SixAxisSensorAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { [Flags] enum SixAxisSensorAttribute : uint diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/SixAxisSensorState.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/SixAxisSensorState.cs similarity index 80% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/SixAxisSensorState.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/SixAxisSensorState.cs index f3c2b208f..9ba1408f1 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/Npad/SixAxisSensorState.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/Npad/SixAxisSensorState.cs @@ -1,8 +1,8 @@ using Ryujinx.Common.Memory; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.Common; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad { [StructLayout(LayoutKind.Sequential, Pack = 1)] struct SixAxisSensorState : ISampledDataStruct diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/SharedMemory.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/SharedMemory.cs similarity index 78% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/SharedMemory.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/SharedMemory.cs index d6283eb57..0fb931021 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/SharedMemory.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/SharedMemory.cs @@ -1,13 +1,13 @@ using Ryujinx.Common.Memory; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.DebugPad; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Keyboard; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Mouse; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Npad; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.TouchScreen; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.Common; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.DebugPad; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.Keyboard; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.Mouse; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.Npad; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.TouchScreen; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory { /// /// Represent the shared memory shared between applications for input. diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/TouchScreen/TouchAttribute.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/TouchScreen/TouchAttribute.cs similarity index 67% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/TouchScreen/TouchAttribute.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/TouchScreen/TouchAttribute.cs index 44d7c22aa..5cb2a6cfa 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/TouchScreen/TouchAttribute.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/TouchScreen/TouchAttribute.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.TouchScreen +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.TouchScreen { [Flags] public enum TouchAttribute : uint diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/TouchScreen/TouchScreenState.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/TouchScreen/TouchScreenState.cs similarity index 71% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/TouchScreen/TouchScreenState.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/TouchScreen/TouchScreenState.cs index d256da0de..cd6017d9b 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/TouchScreen/TouchScreenState.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/TouchScreen/TouchScreenState.cs @@ -1,8 +1,8 @@ using Ryujinx.Common.Memory; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.Common; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.Common; using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.TouchScreen +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.TouchScreen { [StructLayout(LayoutKind.Sequential, Pack = 1)] struct TouchScreenState : ISampledDataStruct diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/TouchScreen/TouchState.cs b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/TouchScreen/TouchState.cs similarity index 88% rename from src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/TouchScreen/TouchState.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/TouchScreen/TouchState.cs index 06be9b24c..f632bc22b 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Types/SharedMemory/TouchScreen/TouchState.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SharedMemory/TouchScreen/TouchState.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.TouchScreen +namespace Ryujinx.Horizon.Sdk.Hid.SharedMemory.TouchScreen { struct TouchState { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/SixAxis/AccelerometerParameters.cs b/src/Ryujinx.Horizon/Sdk/Hid/SixAxis/AccelerometerParameters.cs similarity index 71% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/SixAxis/AccelerometerParameters.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SixAxis/AccelerometerParameters.cs index baabffa05..f1c6038c2 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/SixAxis/AccelerometerParameters.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SixAxis/AccelerometerParameters.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.SixAxis { public struct AccelerometerParameters { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/SixAxis/GyroscopeZeroDriftMode.cs b/src/Ryujinx.Horizon/Sdk/Hid/SixAxis/GyroscopeZeroDriftMode.cs similarity index 71% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/SixAxis/GyroscopeZeroDriftMode.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SixAxis/GyroscopeZeroDriftMode.cs index d73c60251..1dfd8f359 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/SixAxis/GyroscopeZeroDriftMode.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SixAxis/GyroscopeZeroDriftMode.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.SixAxis { public enum GyroscopeZeroDriftMode { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/SixAxis/SensorFusionParameters.cs b/src/Ryujinx.Horizon/Sdk/Hid/SixAxis/SensorFusionParameters.cs similarity index 74% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/SixAxis/SensorFusionParameters.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SixAxis/SensorFusionParameters.cs index c74214565..5f30f8fef 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/SixAxis/SensorFusionParameters.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SixAxis/SensorFusionParameters.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.SixAxis { public struct SensorFusionParameters { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/SixAxisInput.cs b/src/Ryujinx.Horizon/Sdk/Hid/SixAxisInput.cs similarity index 78% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/SixAxisInput.cs rename to src/Ryujinx.Horizon/Sdk/Hid/SixAxisInput.cs index 5c5c5d8c1..dd0341487 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/SixAxisInput.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/SixAxisInput.cs @@ -1,6 +1,7 @@ +using Ryujinx.Horizon.Sdk.Hid.Npad; using System.Numerics; -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid { public struct SixAxisInput { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/TouchPoint.cs b/src/Ryujinx.Horizon/Sdk/Hid/TouchPoint.cs similarity index 67% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/TouchPoint.cs rename to src/Ryujinx.Horizon/Sdk/Hid/TouchPoint.cs index ab0c85262..1b6a97340 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidDevices/Types/TouchPoint.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/TouchPoint.cs @@ -1,6 +1,6 @@ -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.TouchScreen; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.TouchScreen; -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid { public struct TouchPoint { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationDeviceHandle.cs b/src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationDeviceHandle.cs similarity index 80% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationDeviceHandle.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationDeviceHandle.cs index 02f4b6840..dfbeaf259 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationDeviceHandle.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationDeviceHandle.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Vibration { public struct VibrationDeviceHandle { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationDevicePosition.cs b/src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationDevicePosition.cs similarity index 69% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationDevicePosition.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationDevicePosition.cs index 90f4abcc3..7cb61a8f7 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationDevicePosition.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationDevicePosition.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Vibration { public enum VibrationDevicePosition { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationDeviceType.cs b/src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationDeviceType.cs similarity index 71% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationDeviceType.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationDeviceType.cs index db586bb34..308e635c4 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationDeviceType.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationDeviceType.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Vibration { public enum VibrationDeviceType { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationDeviceValue.cs b/src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationDeviceValue.cs similarity index 77% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationDeviceValue.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationDeviceValue.cs index feed8764d..3f4be6deb 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationDeviceValue.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationDeviceValue.cs @@ -1,4 +1,4 @@ -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Vibration { public struct VibrationDeviceValue { diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationValue.cs b/src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationValue.cs similarity index 95% rename from src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationValue.cs rename to src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationValue.cs index 490d1e6ab..5592d6499 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/HidServer/Types/Vibration/VibrationValue.cs +++ b/src/Ryujinx.Horizon/Sdk/Hid/Vibration/VibrationValue.cs @@ -1,6 +1,6 @@ using System; -namespace Ryujinx.HLE.HOS.Services.Hid +namespace Ryujinx.Horizon.Sdk.Hid.Vibration { public struct VibrationValue { diff --git a/src/Ryujinx.Horizon/Sdk/Irsensor/IIrSensorServer.cs b/src/Ryujinx.Horizon/Sdk/Irsensor/IIrSensorServer.cs new file mode 100644 index 000000000..e27bedb71 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Irsensor/IIrSensorServer.cs @@ -0,0 +1,29 @@ +using Ryujinx.Horizon.Common; +using Ryujinx.Horizon.Sdk.Applet; +using Ryujinx.Horizon.Sdk.Sf; +using System; + +namespace Ryujinx.Horizon.Sdk.Irsensor +{ + interface IIrSensorServer : IServiceObject + { + Result ActivateIrsensor(AppletResourceUserId arg0, ulong pid); + Result DeactivateIrsensor(AppletResourceUserId arg0, ulong pid); + Result GetIrsensorSharedMemoryHandle(out int arg0, AppletResourceUserId arg1, ulong pid); + Result StopImageProcessor(AppletResourceUserId arg0, IrCameraHandle arg1, ulong pid); + Result RunMomentProcessor(AppletResourceUserId arg0, IrCameraHandle arg1, PackedMomentProcessorConfig arg2, ulong pid); + Result RunClusteringProcessor(AppletResourceUserId arg0, IrCameraHandle arg1, PackedClusteringProcessorConfig arg2, ulong pid); + Result RunImageTransferProcessor(AppletResourceUserId arg0, IrCameraHandle arg1, PackedImageTransferProcessorConfig arg2, int arg3, ulong arg4, ulong pid); + Result GetImageTransferProcessorState(AppletResourceUserId arg0, out ImageTransferProcessorState arg1, Span arg2, IrCameraHandle arg3, ulong pid); + Result RunTeraPluginProcessor(AppletResourceUserId arg0, IrCameraHandle arg1, PackedTeraPluginProcessorConfig arg2, ulong pid); + Result GetNpadIrCameraHandle(out IrCameraHandle arg0, uint arg1); + Result RunPointingProcessor(AppletResourceUserId arg0, IrCameraHandle arg1, PackedPointingProcessorConfig arg2, ulong pid); + Result SuspendImageProcessor(AppletResourceUserId arg0, IrCameraHandle arg1, ulong pid); + Result CheckFirmwareVersion(AppletResourceUserId arg0, IrCameraHandle arg1, PackedMcuVersion arg2, ulong pid); + Result SetFunctionLevel(AppletResourceUserId arg0, IrCameraHandle arg1, PackedFunctionLevel arg2, ulong pid); + Result RunImageTransferExProcessor(AppletResourceUserId arg0, IrCameraHandle arg1, PackedImageTransferProcessorExConfig arg2, int arg3, ulong arg4, ulong pid); + Result RunIrLedProcessor(AppletResourceUserId arg0, IrCameraHandle arg1, PackedIrLedProcessorConfig arg2, ulong pid); + Result StopImageProcessorAsync(AppletResourceUserId arg0, IrCameraHandle arg1, ulong pid); + Result ActivateIrsensorWithFunctionLevel(AppletResourceUserId arg0, PackedFunctionLevel arg1, ulong pid); + } +} diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/ImageTransferProcessorState.cs b/src/Ryujinx.Horizon/Sdk/Irsensor/ImageTransferProcessorState.cs similarity index 83% rename from src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/ImageTransferProcessorState.cs rename to src/Ryujinx.Horizon/Sdk/Irsensor/ImageTransferProcessorState.cs index 76a07f797..1084d9a3c 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/ImageTransferProcessorState.cs +++ b/src/Ryujinx.Horizon/Sdk/Irsensor/ImageTransferProcessorState.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Irs.Types +namespace Ryujinx.Horizon.Sdk.Irsensor { [StructLayout(LayoutKind.Sequential, Size = 0x10)] struct ImageTransferProcessorState diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/IrCameraHandle.cs b/src/Ryujinx.Horizon/Sdk/Irsensor/IrCameraHandle.cs similarity index 82% rename from src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/IrCameraHandle.cs rename to src/Ryujinx.Horizon/Sdk/Irsensor/IrCameraHandle.cs index a15e445c7..d04105d57 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/IrCameraHandle.cs +++ b/src/Ryujinx.Horizon/Sdk/Irsensor/IrCameraHandle.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Irs.Types +namespace Ryujinx.Horizon.Sdk.Irsensor { [StructLayout(LayoutKind.Sequential, Size = 0x4)] struct IrCameraHandle diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/PackedClusteringProcessorConfig.cs b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedClusteringProcessorConfig.cs similarity index 88% rename from src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/PackedClusteringProcessorConfig.cs rename to src/Ryujinx.Horizon/Sdk/Irsensor/PackedClusteringProcessorConfig.cs index d12513fab..aa469bf4c 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/PackedClusteringProcessorConfig.cs +++ b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedClusteringProcessorConfig.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Irs.Types +namespace Ryujinx.Horizon.Sdk.Irsensor { [StructLayout(LayoutKind.Sequential, Size = 0x28)] struct PackedClusteringProcessorConfig @@ -15,7 +15,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid.Irs.Types public ushort WindowOfInterestY; public ushort WindowOfInterestWidth; public ushort WindowOfInterestHeight; - public uint RequiredMcuVersion; + public PackedMcuVersion RequiredMcuVersion; public uint ObjectPixelCountMin; public uint ObjectPixelCountMax; public byte ObjectIntensityMin; diff --git a/src/Ryujinx.Horizon/Sdk/Irsensor/PackedFunctionLevel.cs b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedFunctionLevel.cs new file mode 100644 index 000000000..b1c01483c --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedFunctionLevel.cs @@ -0,0 +1,10 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.Horizon.Sdk.Irsensor +{ + [StructLayout(LayoutKind.Sequential, Size = 0x4)] + struct PackedFunctionLevel + { + public byte IrSensorFunctionLevel; + } +} diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/PackedImageTransferProcessorConfig.cs b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedImageTransferProcessorConfig.cs similarity index 82% rename from src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/PackedImageTransferProcessorConfig.cs rename to src/Ryujinx.Horizon/Sdk/Irsensor/PackedImageTransferProcessorConfig.cs index 0bc709f20..796a4bcba 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/PackedImageTransferProcessorConfig.cs +++ b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedImageTransferProcessorConfig.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Irs.Types +namespace Ryujinx.Horizon.Sdk.Irsensor { [StructLayout(LayoutKind.Sequential, Size = 0x18)] struct PackedImageTransferProcessorConfig @@ -11,7 +11,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid.Irs.Types public byte IsNegativeImageUsed; public byte Reserved1; public uint Reserved2; - public uint RequiredMcuVersion; + public PackedMcuVersion RequiredMcuVersion; public byte Format; public byte Reserved3; public ushort Reserved4; diff --git a/src/Ryujinx.Horizon/Sdk/Irsensor/PackedImageTransferProcessorExConfig.cs b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedImageTransferProcessorExConfig.cs new file mode 100644 index 000000000..c3d420e73 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedImageTransferProcessorExConfig.cs @@ -0,0 +1,20 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.Horizon.Sdk.Irsensor +{ + [StructLayout(LayoutKind.Sequential, Size = 0x20)] + struct PackedImageTransferProcessorExConfig + { + public long ExposureTime; + public byte LightTarget; + public byte Gain; + public byte IsNegativeImageUsed; + public byte Reserved1; + public PackedMcuVersion RequiredMcuVersion; + public byte OrigFormat; + public byte TrimmingFormat; + public ushort TrimmingStartX; + public ushort TrimmingStartY; + public byte IsExternalLightFilterEnabled; + } +} diff --git a/src/Ryujinx.Horizon/Sdk/Irsensor/PackedIrLedProcessorConfig.cs b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedIrLedProcessorConfig.cs new file mode 100644 index 000000000..2f081f329 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedIrLedProcessorConfig.cs @@ -0,0 +1,11 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.Horizon.Sdk.Irsensor +{ + [StructLayout(LayoutKind.Sequential, Size = 0x8)] + struct PackedIrLedProcessorConfig + { + public PackedMcuVersion RequiredMcuVersion; + public byte LightTarget; + } +} diff --git a/src/Ryujinx.Horizon/Sdk/Irsensor/PackedMcuVersion.cs b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedMcuVersion.cs new file mode 100644 index 000000000..1bd198528 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedMcuVersion.cs @@ -0,0 +1,11 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.Horizon.Sdk.Irsensor +{ + [StructLayout(LayoutKind.Sequential, Size = 0x4)] + public struct PackedMcuVersion + { + public short MajorVersion; + public short MinorVersion; + } +} diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/PackedMomentProcessorConfig.cs b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedMomentProcessorConfig.cs similarity index 87% rename from src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/PackedMomentProcessorConfig.cs rename to src/Ryujinx.Horizon/Sdk/Irsensor/PackedMomentProcessorConfig.cs index f1905ee3a..408a4adbd 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/PackedMomentProcessorConfig.cs +++ b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedMomentProcessorConfig.cs @@ -1,6 +1,6 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Irs.Types +namespace Ryujinx.Horizon.Sdk.Irsensor { [StructLayout(LayoutKind.Sequential, Size = 0x20)] struct PackedMomentProcessorConfig @@ -15,7 +15,7 @@ namespace Ryujinx.HLE.HOS.Services.Hid.Irs.Types public ushort WindowOfInterestY; public ushort WindowOfInterestWidth; public ushort WindowOfInterestHeight; - public uint RequiredMcuVersion; + public PackedMcuVersion RequiredMcuVersion; public byte Preprocess; public byte PreprocessIntensityThreshold; public ushort Reserved3; diff --git a/src/Ryujinx.Horizon/Sdk/Irsensor/PackedPointingProcessorConfig.cs b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedPointingProcessorConfig.cs new file mode 100644 index 000000000..71a09fb55 --- /dev/null +++ b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedPointingProcessorConfig.cs @@ -0,0 +1,14 @@ +using System.Runtime.InteropServices; + +namespace Ryujinx.Horizon.Sdk.Irsensor +{ + [StructLayout(LayoutKind.Sequential, Size = 0x20)] + struct PackedPointingProcessorConfig + { + public ushort WindowOfInterestX; + public ushort WindowOfInterestY; + public ushort WindowOfInterestWidth; + public ushort WindowOfInterestHeight; + public PackedMcuVersion RequiredMcuVersion; + } +} diff --git a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/PackedTeraPluginProcessorConfig.cs b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedTeraPluginProcessorConfig.cs similarity index 74% rename from src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/PackedTeraPluginProcessorConfig.cs rename to src/Ryujinx.Horizon/Sdk/Irsensor/PackedTeraPluginProcessorConfig.cs index 1cc2533a2..20170cd31 100644 --- a/src/Ryujinx.HLE/HOS/Services/Hid/Irs/Types/PackedTeraPluginProcessorConfig.cs +++ b/src/Ryujinx.Horizon/Sdk/Irsensor/PackedTeraPluginProcessorConfig.cs @@ -1,11 +1,11 @@ using System.Runtime.InteropServices; -namespace Ryujinx.HLE.HOS.Services.Hid.Irs.Types +namespace Ryujinx.Horizon.Sdk.Irsensor { [StructLayout(LayoutKind.Sequential, Size = 0x8)] struct PackedTeraPluginProcessorConfig { - public uint RequiredMcuVersion; + public PackedMcuVersion RequiredMcuVersion; public byte Mode; public byte Unknown1; public byte Unknown2; diff --git a/src/Ryujinx.Input/HLE/NpadController.cs b/src/Ryujinx.Input/HLE/NpadController.cs index 380745283..0eabeb695 100644 --- a/src/Ryujinx.Input/HLE/NpadController.cs +++ b/src/Ryujinx.Input/HLE/NpadController.cs @@ -4,6 +4,9 @@ using Ryujinx.Common.Configuration.Hid.Controller; using Ryujinx.Common.Configuration.Hid.Controller.Motion; using Ryujinx.Common.Logging; using Ryujinx.HLE.HOS.Services.Hid; +using Ryujinx.Horizon.Sdk.Hid; +using Ryujinx.Horizon.Sdk.Hid.Npad; +using Ryujinx.Horizon.Sdk.Hid.Vibration; using System; using System.Collections.Concurrent; using System.Numerics; diff --git a/src/Ryujinx.Input/HLE/NpadManager.cs b/src/Ryujinx.Input/HLE/NpadManager.cs index 1dc87358d..077c8fb6d 100644 --- a/src/Ryujinx.Input/HLE/NpadManager.cs +++ b/src/Ryujinx.Input/HLE/NpadManager.cs @@ -2,6 +2,7 @@ using Ryujinx.Common.Configuration.Hid; using Ryujinx.Common.Configuration.Hid.Controller; using Ryujinx.Common.Configuration.Hid.Keyboard; using Ryujinx.HLE.HOS.Services.Hid; +using Ryujinx.Horizon.Sdk.Hid; using System; using System.Collections.Generic; using System.Diagnostics; @@ -9,7 +10,7 @@ using System.Linq; using System.Runtime.CompilerServices; using CemuHookClient = Ryujinx.Input.Motion.CemuHook.Client; using ControllerType = Ryujinx.Common.Configuration.Hid.ControllerType; -using PlayerIndex = Ryujinx.HLE.HOS.Services.Hid.PlayerIndex; +using PlayerIndex = Ryujinx.Horizon.Sdk.Hid.Npad.PlayerIndex; using Switch = Ryujinx.HLE.Switch; namespace Ryujinx.Input.HLE diff --git a/src/Ryujinx.Input/HLE/TouchScreenManager.cs b/src/Ryujinx.Input/HLE/TouchScreenManager.cs index c613f9281..8eca63338 100644 --- a/src/Ryujinx.Input/HLE/TouchScreenManager.cs +++ b/src/Ryujinx.Input/HLE/TouchScreenManager.cs @@ -1,6 +1,7 @@ using Ryujinx.HLE; using Ryujinx.HLE.HOS.Services.Hid; -using Ryujinx.HLE.HOS.Services.Hid.Types.SharedMemory.TouchScreen; +using Ryujinx.Horizon.Sdk.Hid; +using Ryujinx.Horizon.Sdk.Hid.SharedMemory.TouchScreen; using System; namespace Ryujinx.Input.HLE diff --git a/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs b/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs index 6b999b1f4..d69e5e48d 100644 --- a/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs +++ b/src/Ryujinx/UI/Applet/ControllerAppletDialog.axaml.cs @@ -9,6 +9,8 @@ using Ryujinx.Ava.UI.Windows; using Ryujinx.Common; using Ryujinx.HLE.HOS.Applets; using Ryujinx.HLE.HOS.Services.Hid; +using Ryujinx.Horizon.Sdk.Hid.Npad; +using System; using System.Linq; using System.Threading.Tasks;