int CmKeyboard::Initialize() {
	//device selection
	SetControlDevice(DEV_MKeys_S);
	isplug = IsDevicePlug();
	if (isplug == 1) {
		device = 1;
	}
	else {
		SetControlDevice(DEV_MKeys_L);
		isplug = IsDevicePlug();
		if (isplug == 1) {
			device = 0;
		}
	}

	// count "col" by device type
	if (device == 0) {
		dev_column = 22;
		col = (int)(256 / 22);
	}
	else if (device == 1) {
		dev_column = 18;
		col = (int)(256 / 18);
	}

	// finish init
	if (isplug == 1) {
		EnableLedControl(true);
		RefreshLed(true);
		INITED = true;
	}
	return isplug;
}
void CmKeyboard::Initialize()
{
#ifdef COOLER_MASTER_ENABLED
	//device selection
	SetControlDevice(DEV_MKeys_S);
	isplug = IsDevicePlug();
	if (isplug == 1)
    {
		device = 1;
	}
	else
    {
		SetControlDevice(DEV_MKeys_L);
		isplug = IsDevicePlug();
		if (isplug == 1)
        {
			device = 0;
		}
	}

    for (int y = 0; y < 6; y++)
    {
        y_idx_list[y] = ROW_IDX_SPECTROGRAPH_TOP + (y * (SPECTROGRAPH_ROWS / 6)) + (0.5f * (SPECTROGRAPH_ROWS / 6));
    }

	// count "col" by device type
	if (device == 0)
    {
		dev_column = 22;
		col = (int)(SPECTROGRAPH_COLS / 22);
	}
	else if (device == 1)
    {
		dev_column = 18;
		col = (int)(SPECTROGRAPH_COLS / 18);
	}

	// finish init
	if (isplug == 1)
    {
		EnableLedControl(true);
		RefreshLed(true);
		INITED = true;
	}
#endif
}