chroma-sdk / Colore

A powerful C# library for Razer Chroma's SDK
https://chroma-sdk.github.io/Colore/
MIT License
146 stars 30 forks source link

IsSdkAvailable uses wrong registry path #288

Closed WolfspiritM closed 3 years ago

WolfspiritM commented 3 years ago

Description

Since latest updates it seems like the SDK changed the path where the "Enable" flag is written to in the registry. The old path was "HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Razer Chroma SDK" the new one seems to be in the subkey "Apps". image

For old installations the Enable flag that exists doesn't get removed so it keeps working there but new installs fail

Expected Behavior

Detect if the SDK is enabled or not

Actual Behavior

NullReferenceException as key.GetValue("Enable") returns null

Possible Fix

Check the new location

Steps to Reproduce

  1. Delete Registry Key
  2. Repair Synapse installation
  3. Call IsSdkAvailable with the native SDK

Context

GameDog stopped working on fresh installed windows

Your Environment

tgraupmann commented 3 years ago

Using registry checks is not the ideal way to check for this. Instead the Init and InitSDK API should be used. A zero success result means the Chroma SDK has initialized. A non-zero result means a failure.

Sharparam commented 3 years ago

@tgraupmann We want to explicitly check the availability without actually initializing the SDK, though.