mirror of
https://github.com/Palakis/obs-websocket.git
synced 2024-08-30 18:12:16 +00:00
Events: Prepare to add a few new OBS events
Pending PR merge and version release
This commit is contained in:
parent
1b25e98dc2
commit
42c78f1831
@ -237,12 +237,18 @@ void EventHandler::OnFrontendEvent(enum obs_frontend_event event, void *private_
|
||||
break;
|
||||
|
||||
// Config
|
||||
//case OBS_FRONTEND_EVENT_SCENE_COLLECTION_CHANGING:
|
||||
// eventHandler->HandleCurrentSceneCollectionChanging();
|
||||
// break;
|
||||
case OBS_FRONTEND_EVENT_SCENE_COLLECTION_CHANGED:
|
||||
eventHandler->HandleCurrentSceneCollectionChanged();
|
||||
break;
|
||||
case OBS_FRONTEND_EVENT_SCENE_COLLECTION_LIST_CHANGED:
|
||||
eventHandler->HandleSceneCollectionListChanged();
|
||||
break;
|
||||
//case OBS_FRONTEND_EVENT_PROFILE_CHANGING:
|
||||
// eventHandler->HandleCurrentProfileChanging();
|
||||
// break;
|
||||
case OBS_FRONTEND_EVENT_PROFILE_CHANGED:
|
||||
eventHandler->HandleCurrentProfileChanged();
|
||||
break;
|
||||
|
@ -69,8 +69,10 @@ class EventHandler
|
||||
void HandleStudioModeStateChanged(bool enabled);
|
||||
|
||||
// Config
|
||||
void HandleCurrentSceneCollectionChanging();
|
||||
void HandleCurrentSceneCollectionChanged();
|
||||
void HandleSceneCollectionListChanged();
|
||||
void HandleCurrentProfileChanging();
|
||||
void HandleCurrentProfileChanged();
|
||||
void HandleProfileListChanged();
|
||||
|
||||
|
@ -1,5 +1,12 @@
|
||||
#include "EventHandler.h"
|
||||
|
||||
void EventHandler::HandleCurrentSceneCollectionChanging()
|
||||
{
|
||||
json eventData;
|
||||
eventData["sceneCollectionName"] = Utils::Obs::StringHelper::GetCurrentSceneCollection();
|
||||
BroadcastEvent(EventSubscription::Config, "CurrentSceneCollectionChanging", eventData);
|
||||
}
|
||||
|
||||
void EventHandler::HandleCurrentSceneCollectionChanged()
|
||||
{
|
||||
json eventData;
|
||||
@ -14,6 +21,13 @@ void EventHandler::HandleSceneCollectionListChanged()
|
||||
BroadcastEvent(EventSubscription::Config, "SceneCollectionListChanged", eventData);
|
||||
}
|
||||
|
||||
void EventHandler::HandleCurrentProfileChanging()
|
||||
{
|
||||
json eventData;
|
||||
eventData["profileName"] = Utils::Obs::StringHelper::GetCurrentProfile();
|
||||
BroadcastEvent(EventSubscription::Config, "CurrentProfileChanging", eventData);
|
||||
}
|
||||
|
||||
void EventHandler::HandleCurrentProfileChanged()
|
||||
{
|
||||
json eventData;
|
||||
|
Loading…
Reference in New Issue
Block a user