mirror of
https://github.com/CalcProgrammer1/OpenRGB.git
synced 2026-01-23 14:37:57 -05:00
Rework Profiles to use JSON format
* Update OpenRGB Plugin Interface to include functions for loading/saving profile JSON data into OpenRGB profiles
* Update ProfileManager to handle auto-load profiles (Exit, Open, Resume, Suspend) and move their settings to ProfileManager section
* Update ProfileManager to store profiles in "profiles" folder in .json format
* Update ProfileManager to store size profile in sizes.json
* Update ProfileManager to perform device UpdateMode/UpdateColors when loading profile
* Code cleanup of ProfileManager and profile-related code
This commit is contained in:
@@ -704,7 +704,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
memcpy(&new_size, data + sizeof(int), sizeof(int));
|
||||
|
||||
controllers[header.pkt_dev_idx]->ResizeZone(zone, new_size);
|
||||
profile_manager->SaveProfile("sizes", true);
|
||||
profile_manager->SaveSizes();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -909,11 +909,6 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
profile_manager->LoadProfile(profile_name);
|
||||
}
|
||||
|
||||
for(RGBController* controller : controllers)
|
||||
{
|
||||
controller->UpdateLEDs();
|
||||
}
|
||||
|
||||
break;
|
||||
|
||||
case NET_PACKET_ID_REQUEST_DELETE_PROFILE:
|
||||
@@ -964,7 +959,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
memcpy(&zone, data, sizeof(int));
|
||||
|
||||
controllers[header.pkt_dev_idx]->ClearSegments(zone);
|
||||
profile_manager->SaveProfile("sizes", true);
|
||||
profile_manager->SaveSizes();
|
||||
}
|
||||
break;
|
||||
|
||||
@@ -979,7 +974,7 @@ void NetworkServer::ListenThreadFunction(NetworkClientInfo * client_info)
|
||||
if(header.pkt_dev_idx < controllers.size())
|
||||
{
|
||||
controllers[header.pkt_dev_idx]->SetSegmentDescription((unsigned char *)data);
|
||||
profile_manager->SaveProfile("sizes", true);
|
||||
profile_manager->SaveSizes();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user