events(ProfileChanged): add new profile name

This commit is contained in:
Stéphane Lepin 2020-11-27 16:47:10 +01:00
parent d87a7e896b
commit fe52cd8db1

View File

@ -546,13 +546,17 @@ void WSEvents::OnTransitionListChange() {
/**
* Triggered when switching to another profile or when renaming the current profile.
*
* @return {String} `profile` Name of the new current profile.
*
* @api events
* @name ProfileChanged
* @category profiles
* @since 4.0.0
*/
void WSEvents::OnProfileChange() {
broadcastUpdate("ProfileChanged");
OBSDataAutoRelease fields = obs_data_create();
obs_data_set_string(fields, "profile", obs_frontend_get_current_profile());
broadcastUpdate("ProfileChanged", fields);
}
/**