Many applications and games can use the Chroma SDK at the same time, yet only one can have the Chroma focus. The APP PRIORITY LIST
defines the priority order and the highest on the list receives the Chroma focus when more than one are actively using the Chroma SDK. Users can adjust the priority order by dragging and dropping or toggling the app completely off. The IsActive() method allows an application or game to check if it has Chroma focus. This allows the title to free up overhead when Chroma is not in use. If a title uses this to check for focus, the state should be periodically checked to turn Chroma back on when focus is returned. When active returns false, the title can stop playing Chroma Animations, disable idle animations, and inactivate dynamic Chroma to free up some overhead. Keep in mind that some apps use Chroma notifications so they will only briefly take Chroma focus and then return it typically over a 5 second period.
bool isActive;
int result = ChromaAnimationAPI.CoreIsActive(out isActive);
if (result == RazerErrors.RZRESULT_SUCCESS)
{
if (isActive)
{
// The game currently has the Chroma focus!
}
else
{
// The game does not currently have the Chroma focus!"
}
}
else
{
// Unable to check for Chroma focus. Unexpected result!
}