Skip to content

Commit 8aeab21

Browse files
Comment out disabled functions in SinowealthControllerDetect.cpp
1 parent 4156b19 commit 8aeab21

File tree

1 file changed

+57
-57
lines changed

1 file changed

+57
-57
lines changed

Controllers/SinowealthController/SinowealthControllerDetect.cpp

Lines changed: 57 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -335,63 +335,63 @@ static void DetectGMOW_Dongle(hid_device_info* info, const std::string& name)
335335
}
336336
}
337337

338-
static void DetectSinowealthKeyboard16(hid_device_info* info, const std::string& name)
339-
{
340-
#ifdef USE_HID_USAGE
341-
unsigned char command[6] = {0x05, 0x83, 0x00, 0x00, 0x00, 0x00};
342-
expected_reports reports{expected_report(0x06, 1032, command, sizeof(command))};
343-
if(!DetectUsages(info, name, 3, reports))
344-
{
345-
return;
346-
}
347-
hid_device *dev = reports.at(0).device;
348-
hid_device *dev_cmd = reports.at(0).cmd_device;
349-
#else
350-
hid_device* dev = hid_open_path(info->path);
351-
hid_device* dev_cmd = dev;
352-
#endif
353-
if(dev && dev_cmd)
354-
{
355-
SinowealthKeyboard16Controller* controller = new SinowealthKeyboard16Controller(dev_cmd, dev, info->path, name);
356-
RGBController *rgb_controller = new RGBController_SinowealthKeyboard16(controller);
357-
rgb_controller->name = name;
358-
359-
ResourceManager::get()->RegisterRGBController(rgb_controller);
360-
}
361-
}
362-
363-
static void DetectSinowealthKeyboard(hid_device_info* info, const std::string& name)
364-
{
365-
#ifdef USE_HID_USAGE
366-
unsigned char command[6] = {0x05, 0x83, 0xB6, 0x00, 0x00, 0x00};
367-
expected_reports reports{expected_report(0x06, 1032, command, sizeof(command))};
368-
if(!DetectUsages(info, name, 3, reports))
369-
{
370-
return;
371-
}
372-
hid_device *dev = reports.at(0).device;
373-
hid_device *dev_cmd = reports.at(0).cmd_device;
374-
if(dev && dev_cmd)
375-
{
376-
SinowealthKeyboardController* controller = new SinowealthKeyboardController(dev_cmd, dev, info->path);
377-
RGBController* rgb_controller = new RGBController_SinowealthKeyboard(controller);
378-
rgb_controller->name = name;
379-
380-
ResourceManager::get()->RegisterRGBController(rgb_controller);
381-
}
382-
#else
383-
// It is unknown why this code used the MOUSE controller here; could it be the reason why it was disabled?
384-
hid_device* dev = hid_open_path(info->path);
385-
if(dev)
386-
{
387-
SinowealthController* controller = new SinowealthController(dev, dev, info->path);
388-
RGBController* rgb_controller = new RGBController_Sinowealth(controller);
389-
rgb_controller->name = name;
390-
391-
ResourceManager::get()->RegisterRGBController(rgb_controller);
392-
}
393-
#endif
394-
}
338+
// static void DetectSinowealthKeyboard16(hid_device_info* info, const std::string& name)
339+
// {
340+
// #ifdef USE_HID_USAGE
341+
// unsigned char command[6] = {0x05, 0x83, 0x00, 0x00, 0x00, 0x00};
342+
// expected_reports reports{expected_report(0x06, 1032, command, sizeof(command))};
343+
// if(!DetectUsages(info, name, 3, reports))
344+
// {
345+
// return;
346+
// }
347+
// hid_device *dev = reports.at(0).device;
348+
// hid_device *dev_cmd = reports.at(0).cmd_device;
349+
// #else
350+
// hid_device* dev = hid_open_path(info->path);
351+
// hid_device* dev_cmd = dev;
352+
// #endif
353+
// if(dev && dev_cmd)
354+
// {
355+
// SinowealthKeyboard16Controller* controller = new SinowealthKeyboard16Controller(dev_cmd, dev, info->path, name);
356+
// RGBController *rgb_controller = new RGBController_SinowealthKeyboard16(controller);
357+
// rgb_controller->name = name;
358+
//
359+
// ResourceManager::get()->RegisterRGBController(rgb_controller);
360+
// }
361+
// }
362+
363+
// static void DetectSinowealthKeyboard(hid_device_info* info, const std::string& name)
364+
// {
365+
// #ifdef USE_HID_USAGE
366+
// unsigned char command[6] = {0x05, 0x83, 0xB6, 0x00, 0x00, 0x00};
367+
// expected_reports reports{expected_report(0x06, 1032, command, sizeof(command))};
368+
// if(!DetectUsages(info, name, 3, reports))
369+
// {
370+
// return;
371+
// }
372+
// hid_device *dev = reports.at(0).device;
373+
// hid_device *dev_cmd = reports.at(0).cmd_device;
374+
// if(dev && dev_cmd)
375+
// {
376+
// SinowealthKeyboardController* controller = new SinowealthKeyboardController(dev_cmd, dev, info->path);
377+
// RGBController* rgb_controller = new RGBController_SinowealthKeyboard(controller);
378+
// rgb_controller->name = name;
379+
//
380+
// ResourceManager::get()->RegisterRGBController(rgb_controller);
381+
// }
382+
// #else
383+
// // It is unknown why this code used the MOUSE controller here; could it be the reason why it was disabled?
384+
// hid_device* dev = hid_open_path(info->path);
385+
// if(dev)
386+
// {
387+
// SinowealthController* controller = new SinowealthController(dev, dev, info->path);
388+
// RGBController* rgb_controller = new RGBController_Sinowealth(controller);
389+
// rgb_controller->name = name;
390+
//
391+
// ResourceManager::get()->RegisterRGBController(rgb_controller);
392+
// }
393+
// #endif
394+
// }
395395

396396
static void DetectSinowealthGenesisKeyboard(hid_device_info* info, const std::string& name)
397397
{

0 commit comments

Comments
 (0)