mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
EventHandler: [BREAKING] Rename CurrentSceneChanged to CurrentProgramSceneChanged
Now matches the requests
This commit is contained in:
parent
e640ae1218
commit
af217c05f1
@ -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();
|
||||
|
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user