Controlling DS4 input programmatically (PC)



  • Cool. I'll give it a try (running in VM and to create Java bindings, perhaps using javacpp).

    By the way, is there some installer for the driver or the only way currently is the PowerCLI way?



  • @harry PowerShell is the way to go until things have cooled down and I can work on a new setup-based installer and publish a long awaited new release. The government is currently holding me back (no, I'm not in prison, I'm waiting on some important legal documents to get processed πŸ˜ͺ )



  • Of course, I wouldn't be asking for anything. PowerCLI gets the job done just fine, so everything's good. I was just wondering if I've missed something.

    By the way, do those legal stuff have anything to do with the work you've been doing on this?



  • @harry said in Controlling DS4 input programmatically (PC):

    Of course, I wouldn't be asking for anything. PowerCLI gets the job done just fine, so everything's good. I was just wondering if I've missed something.

    PowerCLI... I've spotted a VMware user it seems πŸ˜‰

    @harry said in Controlling DS4 input programmatically (PC):

    By the way, do those legal stuff have anything to do with the work you've been doing on this?

    It has indeed. I will shed light on it in greater detail in a dedicated news post. Sorry to beat around the bush but I don't like talking about unfinished business πŸ˜‰



  • @nefarius said in Controlling DS4 input programmatically (PC):

    Sorry to beat around the bush but I don't like talking about unfinished business

    don’t count your chickens before they hatch

    Seems like the closest English translation to the German figure of speech "ΓΌber ungelegte Eier spricht man nicht" πŸ˜‰



  • I've put together a very (very) simple solution to invoke the client API from Java, using JNA. I should mention it only supports DS* calls for now.

    All calls but one seem to be working fine. Specifically, VIGEM_API BOOL vigem_target_is_attached(PVIGEM_TARGET target); never returns true, even when the target is actually attached and I can send reports to it. Perhaps I got the API wrong?

    Isn't that API call supposed to be used right after a vigem_target_add call (with polling for instance) to ensure that the device is attached before starting to send reports?

    Cheers



  • @harry said in Controlling DS4 input programmatically (PC):

    All calls but one seem to be working fine. Specifically, VIGEM_API BOOL vigem_target_is_attached(PVIGEM_TARGET target); never returns true, even when the target is actually attached and I can send reports to it. Perhaps I got the API wrong?

    Oh? That's odd, it's expected to return TRUE when the bus has brought it to working stage. This application uses the API so I suspect it to function properly πŸ€”

    @harry said in Controlling DS4 input programmatically (PC):

    Isn't that API call supposed to be used right after a vigem_target_add call (with polling for instance) to ensure that the device is attached before starting to send reports?

    vigem_target_add is blocking until the device is truly operational and calling vigem_target_is_attached afterwards is expected to return TRUE.

    Cheers





  • @nefarius said in Controlling DS4 input programmatically (PC):

    @harry said in Controlling DS4 input programmatically (PC):

    All calls but one seem to be working fine. Specifically, VIGEM_API BOOL vigem_target_is_attached(PVIGEM_TARGET target); never returns true, even when the target is actually attached and I can send reports to it. Perhaps I got the API wrong?

    Oh? That's odd, it's expected to return TRUE when the bus has brought it to working stage. This application uses the API so I suspect it to function properly πŸ€”

    In fact, I used that code as a reference and I was expecting it to work like you described, but it didn't. Everything else is working fine. I've actually integrated it with some tools that I have and it works like a charm.

    Hats off to you sir! You've done an excellent job πŸ™‚

    I'll try that specific API again, see if I did something wrong in the first place.



  • @harry said in Controlling DS4 input programmatically (PC):

    Hats off to you sir! You've done an excellent job

    Years of stealing studying other peoples C/C++ code got me there, and for my first real public API it's surprisingly solid and even considers backwards compatibility, the wet dream of every Windows developer πŸ˜›

    But thanks, appreciate it.

    If it still bombs for whatever reason maybe we can spin up a quick debugging session; I'm always on the bug-hunt πŸ”«



  • This post is deleted!

Log in to reply