Fix Update

This commit is contained in:
Adam Honse
2026-09-06 13:46:35 -05:00
parent b3fa0c1b96
commit c03d422b32
@@ -868,10 +868,16 @@ bool MSIMotherboard185Controller::Update
}
else
{
/*-------------------------------------------------*\
| Set the save flag |
\*-------------------------------------------------*/
configuration_data.save_data = save;
/*-------------------------------------------------*\
| Save a copy of the new configuration data |
\*-------------------------------------------------*/
FeaturePacket_185 new_configuration = configuration_data;
FeaturePacket_185 new_configuration;
memcpy((unsigned char*)&new_configuration, (unsigned char*)&configuration_data, sizeof(configuration_data));
/*-------------------------------------------------*\
@@ -879,11 +885,6 @@ bool MSIMotherboard185Controller::Update
\*-------------------------------------------------*/
ReadConfigurationData();
/*-------------------------------------------------*\
| Set the save flag on the old data |
\*-------------------------------------------------*/
configuration_data.save_data = save;
/*-------------------------------------------------*\
| First, send a copy of the existing configuration |
| data |
@@ -896,12 +897,7 @@ bool MSIMotherboard185Controller::Update
| Windows sends the old data followed by new data |
| so this mimics that flow. |
\*-------------------------------------------------*/
memcpy((unsigned char*)&new_configuration, (unsigned char*)&new_configuration, sizeof(new_configuration));
/*-------------------------------------------------*\
| Set the save flag on the new data |
\*-------------------------------------------------*/
configuration_data.save_data = save;
memcpy((unsigned char*)&configuration_data, (unsigned char*)&new_configuration, sizeof(new_configuration));
return(hid_send_feature_report(dev, (unsigned char*)&configuration_data, sizeof(configuration_data)) == sizeof(configuration_data));
}