Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- for (unsigned int devIndex = 0; devIndex < numDevs; devIndex++) {
- unsigned char devType = 0;
- unsigned char* devTypePtr = &devType;
- unsigned int descSize = 255;
- char* description = new char[descSize];
- result = getDeviceDescriptionFunction(devIndex, description, descSize, &devType);
- std::cout << "Description: " << description << std::endl;
- delete[]description;
- description = new char[descSize];
- LFX_COLOR color;
- unsigned int numLights = 0;
- result = getNumLightsFunction(devIndex, &numLights);
- for (unsigned int lightIndex = 0; lightIndex < numLights; lightIndex++) {
- result = getLightDescriptionFunction(devIndex, lightIndex, description, descSize);
- if (result != LFX_SUCCESS)
- continue;
- result = getLightColorFunction(devIndex, lightIndex, &color);
- if (result != LFX_SUCCESS)
- continue;
- std::cout << "\tLight: " << lightIndex << "\tDescription: " << description << "\tColor: " <<
- (short) color.brightness << ", " << (short) color.red << ", " <<
- (short) color.green << ", " << (short) color.blue << std::endl;
- }
- delete[]description;
- }
Add Comment
Please, Sign In to add comment