Last active
November 26, 2015 12:31
-
-
Save njbmartin/e943ed1f65d597b5259f to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DWORD WINAPI Thread_LoadingAnimationOnMice(LPVOID lpParameter) | |
{ | |
if(CreateMouseEffect) | |
{ | |
// This works too! | |
// Using old interface. | |
//ChromaSDK::Mouse::CUSTOM_EFFECT_TYPE CustomEffect = {}; | |
//CreateMouseEffect(ChromaSDK::Mouse::CHROMA_CUSTOM, &CustomEffect, NULL); | |
//Sleep(500); | |
//for(UINT i=0; i<7; i++) | |
//{ | |
// CustomEffect.Color[RZLED_SIDE_STRIP7-i] = ORANGE; | |
// CustomEffect.Color[RZLED_SIDE_STRIP14-i] = ORANGE; | |
// if(i == 2) | |
// { | |
// CustomEffect.Color[RZLED_LOGO] = ORANGE; | |
// } | |
// else if(i == 6) | |
// { | |
// CustomEffect.Color[RZLED_SCROLLWHEEL] = ORANGE; | |
// } | |
// CreateMouseEffect(ChromaSDK::Mouse::CHROMA_CUSTOM, &CustomEffect, NULL); | |
// Sleep(50); | |
//} | |
// Using the new mice virtual grid | |
ChromaSDK::Mouse::CUSTOM_EFFECT_TYPE2 CustomEffect = {}; | |
CreateMouseEffect(ChromaSDK::Mouse::CHROMA_CUSTOM2, &CustomEffect, NULL); | |
Sleep(500); | |
for(UINT i=0; i<7; i++) | |
{ | |
CustomEffect.Color[HIBYTE(RZLED2_LEFT_SIDE7)-i][0] = ORANGE; | |
CustomEffect.Color[HIBYTE(RZLED2_RIGHT_SIDE7)-i][6] = ORANGE; | |
if(i == 0) | |
{ | |
// For Razer Diamondback bottom LEDs. | |
CustomEffect.Color[8][LOBYTE(RZLED2_BOTTOM1)] = RED; | |
CustomEffect.Color[8][LOBYTE(RZLED2_BOTTOM5)] = RED; | |
} | |
else if(i == 2) | |
{ | |
CustomEffect.Color[HIBYTE(RZLED2_LOGO)][LOBYTE(RZLED2_LOGO)] = ORANGE; | |
// For Razer Diamondback bottom LEDs. | |
CustomEffect.Color[8][LOBYTE(RZLED2_BOTTOM2)] = RED; | |
CustomEffect.Color[8][LOBYTE(RZLED2_BOTTOM4)] = RED; | |
} | |
else if(i == 4) | |
{ | |
// For Razer Naga Epic numpad LED. | |
CustomEffect.Color[HIBYTE(RZLED2_BACKLIGHT)][LOBYTE(RZLED2_BACKLIGHT)] = ORANGE; | |
} | |
else if(i == 6) | |
{ | |
CustomEffect.Color[HIBYTE(RZLED2_SCROLLWHEEL)][LOBYTE(RZLED2_SCROLLWHEEL)] = ORANGE; | |
// For Razer Diamondback bottom LEDs. | |
CustomEffect.Color[8][LOBYTE(RZLED2_BOTTOM3)] = RED; | |
} | |
CreateMouseEffect(ChromaSDK::Mouse::CHROMA_CUSTOM2, &CustomEffect, NULL); | |
Sleep(50); | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment