You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So this is an odd way to enumerate devices at runtime as shown below.
WootingAnalog_DeviceInfo_FFI* buffer = nullptr;
int len = wooting_analog_get_connected_devices_info(nullptr, 0xFFFFFFFF);
buffer = new WootingAnalog_DeviceInfo_FFI[len];
wooting_analog_get_connected_devices_info(&buffer, len);
It should be done this way so there's no mistake on how it's done. As this method is typically common.
WootingAnalog_DeviceInfo_FFI* buffer = nullptr;
unsignedint size = 0;
wooting_analog_get_connected_devices_info(nullptr, &size); // Given buffer is a "nullptr" which will set the "size" variable.
buffer = new WootingAnalog_DeviceInfo_FFI[size];
wooting_analog_get_connected_devices_info(&buffer, &size); // Here the array is actually set.
The text was updated successfully, but these errors were encountered:
One thing to note is that wooting_analog_initialise actually already returns the number of devices (at init time), which may be useful for whatever your use-case is/was.
So this is an odd way to enumerate devices at runtime as shown below.
It should be done this way so there's no mistake on how it's done. As this method is typically common.
The text was updated successfully, but these errors were encountered: