Closed o0Zz closed 3 months ago
Don't think HOS supports vibration with hiddbg (#347). Have to use other means, such as mitm etc (https://github.com/ndeadly/MissionControl).
@yellows8 thank you for your answer, is it a confirmation or an assumption that the system don't support it ? How can I make sure it really not support it ?
Virtual device is meant to be used as a TAS like controller. Mainly for unit testing as such.
They don't support vibration. If you need vibration you need to mimic a real controller like mission control does
FYI, mission control has a (mostly) working implementation of usb support (including vibration) in the works.
Thank you both for your answers. What I had in mind when I asked if we're sure these APIs don't exist is that these APIs have mainly been reverse engineered and my question was more along the lines of: Is there any chance that some APIs are still "undiscovered" and could be hiding this feature? I will certainly move to a hook for this feature, I'm not sure yet if I'll go for an hybrid solution (hook + hiddbg) or a full hook - what I liked about this hidbg is the simplicity of use, even if I agree with you, it's not the "best" approach here. However, I didn't notice any input lag, so it does the job very nicely ;)
The structs used by 18.0.0 hid for Hdls already match wiki (HdlsDeviceInfo/HdlsState). https://switchbrew.org/wiki/HID_services
Hello,
Context I'm working on a fork of sys-con -> https://github.com/o0Zz/sys-con For this fork I would like to add vibration from 3rd party controllers. I am almost there but one API is missing from libnx and I would like to know if there is a way to add it.
Problem/Request
hidIsVibrationDeviceMounted
returns false for the controller initialized withhiddbgAttachHdlsVirtualDevice
I would like a way to setHidVibrationDeviceInfo
in any way.Summary of the investigation Here is a summary of my investigation. my module uses the following APIs:
Issue,
hidGetActualVibrationValue
return everytime 0 (No vibration) and I think the reason why this API returns 0 is because when we attach a new device (hiddbgAttachHdlsVirtualDevice
) we cannot inform the OS that we support "vibration". From my investigation, I have the feeling that we need a way to set theHidVibrationDeviceInfo
.I built a small application to set vibration: https://github.com/o0Zz/sys-con/blob/master/source/AppletCompanion/source/main.cpp
This code works perfectly with the official switch controller and it shows vibration "Permitted". However, with the sys-con module the same code does not work and it displays vibration "Not Permitted" for all devices initialized with
hiddbgAttachHdlsVirtualDevice
.I'm not sure if my investigation makes sense and I'm not sure how this API can be added but if you have any suggestions I would be happy to hear them ;)
Thanks