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 with hiddbgAttachHdlsVirtualDevice
I would like a way to set HidVibrationDeviceInfo in any way.
Summary of the investigation
Here is a summary of my investigation. my module uses the following APIs:
hiddbgAttachHdlsVirtualDevice(...)
// From here I get the npadId assigned by hiddbgAttachHdlsVirtualDevice with a little trick
hidInitialiseVibrationDevices(...)
hidGetActualVibrationValue(...) //Will always return 0 (even if we set the vibration)
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 the HidVibrationDeviceInfo.
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
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
hidIsVibrationDeviceMountedreturns false for the controller initialized withhiddbgAttachHdlsVirtualDeviceI would like a way to set
HidVibrationDeviceInfoin any way.Summary of the investigation
Here is a summary of my investigation. my module uses the following APIs:
Issue,
hidGetActualVibrationValuereturn 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 the
HidVibrationDeviceInfo.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