From fe52cd8db15cfa95c1a67999b505480822b46b99 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lepin?= Date: Fri, 27 Nov 2020 16:47:10 +0100 Subject: [PATCH] events(ProfileChanged): add new profile name --- src/WSEvents.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/WSEvents.cpp b/src/WSEvents.cpp index c2e9d0bc..d04b2880 100644 --- a/src/WSEvents.cpp +++ b/src/WSEvents.cpp @@ -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); } /**