EventHandler: [BREAKING] Rename CurrentSceneChanged to CurrentProgramSceneChanged

Now matches the requests
This commit is contained in:
tt2468 2021-12-28 23:53:58 -08:00
parent e640ae1218
commit af217c05f1
3 changed files with 5 additions and 5 deletions

View File

@ -285,7 +285,7 @@ void EventHandler::OnFrontendEvent(enum obs_frontend_event event, void *private_
// Scenes
case OBS_FRONTEND_EVENT_SCENE_CHANGED:
eventHandler->HandleCurrentSceneChanged();
eventHandler->HandleCurrentProgramSceneChanged();
break;
case OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED:
eventHandler->HandleCurrentPreviewSceneChanged();

View File

@ -94,7 +94,7 @@ class EventHandler
void HandleSceneCreated(obs_source_t *source);
void HandleSceneRemoved(obs_source_t *source);
void HandleSceneNameChanged(obs_source_t *source, std::string oldSceneName, std::string sceneName);
void HandleCurrentSceneChanged();
void HandleCurrentProgramSceneChanged();
void HandleCurrentPreviewSceneChanged();
void HandleSceneListChanged();

View File

@ -90,7 +90,7 @@ void EventHandler::HandleSceneNameChanged(obs_source_t *, std::string oldSceneNa
*
* @dataField sceneName | String | Name of the scene that was switched to
*
* @eventType CurrentSceneChanged
* @eventType CurrentProgramSceneChanged
* @eventSubscription Scenes
* @complexity 1
* @rpcVersion -1
@ -98,13 +98,13 @@ void EventHandler::HandleSceneNameChanged(obs_source_t *, std::string oldSceneNa
* @api events
* @category scenes
*/
void EventHandler::HandleCurrentSceneChanged()
void EventHandler::HandleCurrentProgramSceneChanged()
{
OBSSourceAutoRelease currentScene = obs_frontend_get_current_scene();
json eventData;
eventData["sceneName"] = obs_source_get_name(currentScene);
BroadcastEvent(EventSubscription::Scenes, "CurrentSceneChanged", eventData);
BroadcastEvent(EventSubscription::Scenes, "CurrentProgramSceneChanged", eventData);
}
/**