Merge branch 'scimitar-elite'

This commit is contained in:
Tasos Sahanidis
2020-07-19 23:47:54 +03:00
2 changed files with 9 additions and 6 deletions
+3 -1
View File
@@ -22,6 +22,7 @@ dpi_list mouse_dpi_list[] = {
{ P_SABRE_N, 10000 },
{ P_SCIMITAR, 12000 },
{ P_SCIMITAR_PRO, 16000 },
{ P_SCIMITAR_ELITE, 18000 },
{ P_SABRE_O2, 6400 },
{ P_HARPOON, 6000 },
{ P_HARPOON_PRO, 12000 },
@@ -70,6 +71,7 @@ device_desc models[] = {
{ V_CORSAIR, P_SABRE_N, },
{ V_CORSAIR, P_SCIMITAR, },
{ V_CORSAIR, P_SCIMITAR_PRO, },
{ V_CORSAIR, P_SCIMITAR_ELITE, },
{ V_CORSAIR, P_SABRE_O2, },
{ V_CORSAIR, P_HARPOON, },
{ V_CORSAIR, P_HARPOON_PRO, },
@@ -166,7 +168,7 @@ const char* product_str(ushort product){
return "m65e";
if(product == P_SABRE_O || product == P_SABRE_L || product == P_SABRE_N || product == P_SABRE_O2)
return "sabre";
if(product == P_SCIMITAR || product == P_SCIMITAR_PRO)
if(product == P_SCIMITAR || product == P_SCIMITAR_PRO || product == P_SCIMITAR_ELITE)
return "scimitar";
if(product == P_HARPOON || product == P_HARPOON_PRO)
return "harpoon";
+6 -5
View File
@@ -101,7 +101,8 @@
#define P_SCIMITAR 0x1b1e
#define P_SCIMITAR_PRO 0x1b3e
#define IS_SCIMITAR(kb) ((kb)->vendor == V_CORSAIR && ((kb)->product == P_SCIMITAR || (kb)->product == P_SCIMITAR_PRO))
#define P_SCIMITAR_ELITE 0x1b8b
#define IS_SCIMITAR(kb) ((kb)->vendor == V_CORSAIR && ((kb)->product == P_SCIMITAR || (kb)->product == P_SCIMITAR_PRO || (kb)->product == P_SCIMITAR_ELITE))
#define P_HARPOON 0x1b3c
#define P_HARPOON_PRO 0x1b75
@@ -178,7 +179,7 @@ const char* product_str(ushort product);
#define IS_FULLRANGE(kb) (!IS_LEGACY((kb)->vendor, (kb)->product) && (kb)->product != P_K65 && (kb)->product != P_K70 && (kb)->product != P_K95 && (kb)->product != P_STRAFE_NRGB)
/// Mouse vs keyboard test
#define IS_MOUSE(vendor, product) ((vendor) == (V_CORSAIR) && ((product) == (P_M65) || (product) == (P_M65_PRO) || (product) == (P_M65_RGB_ELITE) || (product) == (P_M95) || (product) == (P_SABRE_O) || (product) == (P_SABRE_L) || (product) == (P_SABRE_N) || (product) == (P_SCIMITAR) || (product) == (P_SCIMITAR_PRO) || (product) == (P_SABRE_O2) || (product) == (P_GLAIVE) || (product) == (P_HARPOON) || (product) == (P_HARPOON_PRO) || (product) == (P_KATAR) || (product) == (P_IRONCLAW)))
#define IS_MOUSE(vendor, product) ((vendor) == (V_CORSAIR) && ((product) == (P_M65) || (product) == (P_M65_PRO) || (product) == (P_M65_RGB_ELITE) || (product) == (P_M95) || (product) == (P_SABRE_O) || (product) == (P_SABRE_L) || (product) == (P_SABRE_N) || (product) == (P_SCIMITAR) || (product) == (P_SCIMITAR_PRO) || (product) == (P_SCIMITAR_ELITE) || (product) == (P_SABRE_O2) || (product) == (P_GLAIVE) || (product) == (P_HARPOON) || (product) == (P_HARPOON_PRO) || (product) == (P_KATAR) || (product) == (P_IRONCLAW)))
/// For calling with a usbdevice*, vendor and product are extracted and IS_MOUSE() is returned.
#define IS_MOUSE_DEV(kb) IS_MOUSE((kb)->vendor, (kb)->product)
@@ -193,7 +194,7 @@ const char* product_str(ushort product);
/// Used for new devices that come with V3 firmware endpoint configuration out of the factory, but have fwversion < 0x300.
/// Note: only the RGB variant of the K68 needs a v3 override.
/// Note: P_K70_MK2 doesn't seem to require this, but it was added as a precaution
#define IS_V3_OVERRIDE(kb) ((kb)->product == P_K68 || (kb)->product == P_K70_MK2 || (kb)->product == P_K70_MK2SE || (kb)->product == P_STRAFE_MK2 || (kb)->product == P_IRONCLAW)
#define IS_V3_OVERRIDE(kb) ((kb)->product == P_K68 || (kb)->product == P_K70_MK2 || (kb)->product == P_K70_MK2SE || (kb)->product == P_STRAFE_MK2 || (kb)->product == P_IRONCLAW || (kb)->product == P_SCIMITAR_ELITE)
/// Used when a device has a firmware with a low version number that uses the new endpoint configuration.
#define IS_V2_OVERRIDE(kb) (IS_V3_OVERRIDE(kb) || IS_PLATINUM(kb) || IS_K63(kb) || IS_K68(kb) || IS_HARPOON(kb) || IS_GLAIVE(kb) || IS_KATAR(kb) || (kb)->product == P_STRAFE_NRGB_2 || IS_POLARIS(kb) || IS_ST100(kb) || (kb)->product == P_SCIMITAR_PRO || (kb)->product == P_K66)
@@ -202,10 +203,10 @@ const char* product_str(ushort product);
#define IS_SINGLE_EP(kb) (IS_POLARIS(kb) || IS_ST100(kb))
/// Used for devices that use a file-based hardware animation system.
#define USES_FILE_HWSAVE(kb) ((kb)->product == P_K95_PLATINUM || (kb)->product == P_K70_MK2 || (kb)->product == P_K70_MK2SE || (kb)->product == P_STRAFE_MK2 || (kb)->product == P_GLAIVE || (kb)->product == P_SCIMITAR_PRO || (kb)->product == P_K70_MK2LP || (kb)->product == P_M65_RGB_ELITE || (kb)->product == P_IRONCLAW || (kb)->product == P_HARPOON_PRO)
#define USES_FILE_HWSAVE(kb) ((kb)->product == P_K95_PLATINUM || (kb)->product == P_K70_MK2 || (kb)->product == P_K70_MK2SE || (kb)->product == P_STRAFE_MK2 || (kb)->product == P_GLAIVE || (kb)->product == P_SCIMITAR_PRO || (kb)->product == P_SCIMITAR_ELITE || (kb)->product == P_K70_MK2LP || (kb)->product == P_M65_RGB_ELITE || (kb)->product == P_IRONCLAW || (kb)->product == P_HARPOON_PRO)
/// Devices here support setting the pollrate through software
#define SUPPORTS_ADJRATE(kb) ((kb)->product == P_K63_NRGB || (kb)->product == P_K66 || (kb)->product == P_K68 || (kb)->product == P_K68_NRGB || (kb)->product == P_K70_MK2 || (kb)->product == P_K70_MK2SE || (kb)->product == P_K70_MK2LP || (kb)->product == P_K95_PLATINUM || (kb)->product == P_STRAFE || (kb)->product == P_STRAFE_NRGB || (kb)->product == P_STRAFE_NRGB_2 || (kb)->product == P_STRAFE_MK2 || (kb)->product == P_M65 || (kb)->product == P_M65_PRO || (kb)->product == P_M65_RGB_ELITE || (kb)->product == P_M95 || (kb)->product == P_SABRE_O || (kb)->product == P_SABRE_L || (kb)->product == P_SABRE_N || (kb)->product == P_SABRE_O2 || (kb)->product == P_SCIMITAR || (kb)->product == P_SCIMITAR_PRO || (kb)->product == P_HARPOON || (kb)->product == P_HARPOON_PRO || (kb)->product == P_GLAIVE || (kb)->product == P_KATAR)
#define SUPPORTS_ADJRATE(kb) ((kb)->product == P_K63_NRGB || (kb)->product == P_K66 || (kb)->product == P_K68 || (kb)->product == P_K68_NRGB || (kb)->product == P_K70_MK2 || (kb)->product == P_K70_MK2SE || (kb)->product == P_K70_MK2LP || (kb)->product == P_K95_PLATINUM || (kb)->product == P_STRAFE || (kb)->product == P_STRAFE_NRGB || (kb)->product == P_STRAFE_NRGB_2 || (kb)->product == P_STRAFE_MK2 || (kb)->product == P_M65 || (kb)->product == P_M65_PRO || (kb)->product == P_M65_RGB_ELITE || (kb)->product == P_M95 || (kb)->product == P_SABRE_O || (kb)->product == P_SABRE_L || (kb)->product == P_SABRE_N || (kb)->product == P_SABRE_O2 || (kb)->product == P_SCIMITAR || (kb)->product == P_SCIMITAR_ELITE || (kb)->product == P_SCIMITAR_PRO || (kb)->product == P_HARPOON || (kb)->product == P_HARPOON_PRO || (kb)->product == P_GLAIVE || (kb)->product == P_KATAR)
/// USB delays for when the keyboards get picky about timing
/// That was the original comment, but it is used anytime.