event dispatcher
Some checks failed
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m37s
CI / Windows Release Package (push) Has been cancelled

This commit is contained in:
Aiden
2026-05-11 15:15:42 +10:00
parent 5503ce85a9
commit b3705d96cc
20 changed files with 1617 additions and 10 deletions

View File

@@ -6,9 +6,10 @@
#include "RuntimeStore.h"
#include <windows.h>
ControlServices::ControlServices() :
ControlServices::ControlServices(RuntimeEventDispatcher& runtimeEventDispatcher) :
mControlServer(std::make_unique<ControlServer>()),
mOscServer(std::make_unique<OscServer>()),
mRuntimeEventDispatcher(runtimeEventDispatcher),
mPollRunning(false)
{
}

View File

@@ -15,6 +15,7 @@
class ControlServer;
class OpenGLComposite;
class OscServer;
class RuntimeEventDispatcher;
class RuntimeStore;
struct RuntimeCoordinatorServiceResult
@@ -40,7 +41,7 @@ public:
uint64_t generation = 0;
};
ControlServices();
explicit ControlServices(RuntimeEventDispatcher& runtimeEventDispatcher);
~ControlServices();
bool Start(OpenGLComposite& composite, RuntimeStore& runtimeStore, std::string& error);
@@ -79,6 +80,7 @@ private:
std::unique_ptr<ControlServer> mControlServer;
std::unique_ptr<OscServer> mOscServer;
RuntimeEventDispatcher& mRuntimeEventDispatcher;
std::thread mPollThread;
std::atomic<bool> mPollRunning;
std::mutex mRuntimeCoordinatorResultMutex;

View File

@@ -2,8 +2,8 @@
#include "RuntimeStore.h"
RuntimeServices::RuntimeServices() :
mControlServices(std::make_unique<ControlServices>())
RuntimeServices::RuntimeServices(RuntimeEventDispatcher& runtimeEventDispatcher) :
mControlServices(std::make_unique<ControlServices>(runtimeEventDispatcher))
{
}

View File

@@ -6,6 +6,7 @@
#include <string>
class OpenGLComposite;
class RuntimeCoordinator;
class RuntimeEventDispatcher;
class RuntimeStore;
class RuntimeServices
@@ -14,7 +15,7 @@ public:
using AppliedOscUpdate = ControlServices::AppliedOscUpdate;
using CompletedOscCommit = ControlServices::CompletedOscCommit;
RuntimeServices();
explicit RuntimeServices(RuntimeEventDispatcher& runtimeEventDispatcher);
~RuntimeServices();
bool Start(OpenGLComposite& composite, RuntimeStore& runtimeStore, std::string& error);