Skip to content

Commit 7c22710

Browse files
Matt SilvaCalcProgrammer1
Matt Silva
authored andcommitted
Sinowealth detector: fix for rgb controller not being added when USE_HID_USAGE isn't defined
1 parent f53173c commit 7c22710

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

Controllers/SinowealthController/SinowealthControllerDetect.cpp

+2-4
Original file line numberDiff line numberDiff line change
@@ -291,8 +291,6 @@ void DetectSinowealthMouse(hid_device_info* info, const std::string& name)
291291
{
292292
SinowealthController1007* controller = new SinowealthController1007(dev, info->path);
293293
rgb_controller = new RGBController_Sinowealth1007(controller);
294-
rgb_controller->name = name;
295-
ResourceManager::get()->RegisterRGBController(rgb_controller);
296294
}
297295
/*-------------------------------------------------------------------------*\
298296
| See above where USE_HID_USAGE is true for explanation of the detection |
@@ -328,9 +326,9 @@ void DetectSinowealthMouse(hid_device_info* info, const std::string& name)
328326
{
329327
SinowealthController* controller = new SinowealthController(dev, dev, info->path);
330328
rgb_controller = new RGBController_Sinowealth(controller);
331-
rgb_controller->name = name;
332-
ResourceManager::get()->RegisterRGBController(rgb_controller);
333329
}
330+
rgb_controller->name = name;
331+
ResourceManager::get()->RegisterRGBController(rgb_controller);
334332
}
335333
#endif
336334
}

0 commit comments

Comments
 (0)