The Corsair User Forums

The Corsair User Forums (https://forum.corsair.com/forums/index.php)
-   CUE 1.x and 2.x SDK (https://forum.corsair.com/forums/forumdisplay.php?f=271)
-   -   On reconnect: Handshake succeeds but CorsairGetLedPositions returns array of length 0 (https://forum.corsair.com/forums/showthread.php?t=170933)

ygolohcisp 09-04-2017 10:47 AM

On reconnect: Handshake succeeds but CorsairGetLedPositions returns array of length 0
 
In my application I try reconnecting to CUE whenever my keyboard was disconnected, in a loop.
Usually CorsairGetLedPositions() returns an array with the valid / expected LED data. But when I try to reconnect every frame and then start the CUE Software, there is a short time window where the handshake already succeeds but CorsairGetLedPositions() doesn't seem to be "ready" yet: It returns an array of length 0. The pointer is NOT NULL, just the length of the array (numberOfLeds).

So what I do as a workaround in my handshake code, is, I manually check if numberOfLeds is 0 and if so, I return CE_ServerNotFound, even though technically the server was already found by CorsairPerformProtocolHandshake() before, and I also established exclusive control successfully.

This workaround works but I just want to 1. let people know who are in a similar situation and 2. ask if the CUE SDK developers are aware of this and if there are plans to fix this?


All times are GMT -4. The time now is 02:18 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2019, vBulletin Solutions, Inc.