mirror of
https://github.com/WarmUpTill/SceneSwitcher.git
synced 2026-08-20 00:05:41 -05:00
Add/Move helpers to register OBS websocket vendor requests
Adds websocket vendor requests to start and stop the plugin. Adds vendor events to indicate when the plugin is started or stopped. These are ntended to be used for the StreamDeck plugin support.
This commit is contained in:
@@ -14,6 +14,7 @@
|
||||
#include "tab-helpers.hpp"
|
||||
#include "utility.hpp"
|
||||
#include "version.h"
|
||||
#include "websocket-api.hpp"
|
||||
|
||||
#include <obs-frontend-api.h>
|
||||
#include <QAction>
|
||||
@@ -454,6 +455,8 @@ void SwitcherData::Start()
|
||||
|
||||
// Will be overwritten quickly but might be useful
|
||||
writeToStatusFile("Advanced Scene Switcher running");
|
||||
SendWebsocketVendorEvent("AdvancedSceneSwitcherStarted",
|
||||
nullptr);
|
||||
}
|
||||
|
||||
if (showSystemTrayNotifications) {
|
||||
@@ -481,6 +484,10 @@ void SwitcherData::Stop()
|
||||
delete th;
|
||||
th = nullptr;
|
||||
writeToStatusFile("Advanced Scene Switcher stopped");
|
||||
if (!obsIsShuttingDown) {
|
||||
SendWebsocketVendorEvent("AdvancedSceneSwitcherStopped",
|
||||
nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
if (showSystemTrayNotifications) {
|
||||
|
||||
Reference in New Issue
Block a user