Ignore location string when loading profiles for HID devices
This commit is contained in:
parent
d19baf1365
commit
a7acefb284
1 changed files with 19 additions and 7 deletions
|
|
@ -171,6 +171,18 @@ bool ProfileManager::LoadDeviceFromListWithOptions
|
|||
{
|
||||
RGBController *temp_controller = temp_controllers[temp_index];
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Do not compare location string for HID devices, as the |
|
||||
| location string may change between runs as devices are |
|
||||
| connected and disconnected |
|
||||
\*---------------------------------------------------------*/
|
||||
bool compare_location = true;
|
||||
|
||||
if(load_controller->location.find("HID: ") == 0)
|
||||
{
|
||||
compare_location = false;
|
||||
}
|
||||
|
||||
/*---------------------------------------------------------*\
|
||||
| Test if saved controller data matches this controller |
|
||||
\*---------------------------------------------------------*/
|
||||
|
|
@ -180,7 +192,7 @@ bool ProfileManager::LoadDeviceFromListWithOptions
|
|||
&&(temp_controller->description == load_controller->description )
|
||||
&&(temp_controller->version == load_controller->version )
|
||||
&&(temp_controller->serial == load_controller->serial )
|
||||
&&(temp_controller->location == load_controller->location ))
|
||||
&&((temp_controller->location == load_controller->location ) || (!compare_location)))
|
||||
{
|
||||
/*---------------------------------------------------------*\
|
||||
| Update zone sizes if requested |
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue