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 // Scenes
case OBS_FRONTEND_EVENT_SCENE_CHANGED: case OBS_FRONTEND_EVENT_SCENE_CHANGED:
eventHandler->HandleCurrentSceneChanged(); eventHandler->HandleCurrentProgramSceneChanged();
break; break;
case OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED: case OBS_FRONTEND_EVENT_PREVIEW_SCENE_CHANGED:
eventHandler->HandleCurrentPreviewSceneChanged(); eventHandler->HandleCurrentPreviewSceneChanged();

View File

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