Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Commit

Permalink
core: added support for custom color
Browse files Browse the repository at this point in the history
The service will look for the KeyboardColorizationColor registry key and
apply the color to the keyboard backlight. It falls back to the Aero
colorization color if this key is not found.
  • Loading branch information
angel committed Jun 17, 2020
1 parent 4551253 commit 4d278d4
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions core.c
Original file line number Diff line number Diff line change
Expand Up @@ -169,12 +169,9 @@ CoreSyncColorization(void)
DWORD dwType = REG_DWORD;
DWORD dwColorization = 0;
DWORD cbColorization = sizeof(dwColorization);
if (RegQueryValueExW(g_hkColorization,
L"ColorizationColor",
NULL,
&dwType,
(LPBYTE) &dwColorization,
&cbColorization) == ERROR_SUCCESS)

if (RegQueryValueExW(g_hkColorization, L"KeyboardColorizationColor", NULL, &dwType, (LPBYTE)&dwColorization, &cbColorization) == ERROR_SUCCESS
|| RegQueryValueExW(g_hkColorization, L"ColorizationColor", NULL, &dwType, (LPBYTE)&dwColorization, &cbColorization) == ERROR_SUCCESS)
{
wprintf(L"syncing colorization\n");

Expand Down

0 comments on commit 4d278d4

Please sign in to comment.