A question about Chroma C++ SDK

Discussion in 'Razer Chroma' started by ArthurGoodman, Apr 23, 2019.

Thread Status:
Not open for further replies.
  1. ArthurGoodman

    ArthurGoodman New Member

    Hello, everyone!
    Let's say I have a simple C++ application:

    RZRESULT res = Init();
    assert(res == RZRESULT_SUCCESS);

    ChromaSDK::Keyboard::STATIC_EFFECT_TYPE effect{};
    effect.Color = RGB(255, 0, 0);

    // std::this_thread::sleep_for(std::chrono::seconds{1}); // This fixes it!

    res = CreateKeyboardEffect(ChromaSDK::Keyboard::CHROMA_STATIC, &effect, NULL);
    assert(res == RZRESULT_SUCCESS);


    res = UnInit();
    assert(res == RZRESULT_SUCCESS);

    Weirdly enough, this application doesn't work, unless I delay setting the effect for roughly a second. All asserts pass, but the effect doesn't apply. Looks like there's some kind of asynchronous initialization happening with no explicit way to control or observe it. Am I doing something wrong? Is there a way to consistently enable an effect immediately after application start?
Thread Status:
Not open for further replies.
Sign In with Razer ID >

Don't have a Razer ID yet?
Get Razer ID >