OSC seperation
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m36s
CI / Windows Release Package (push) Successful in 2m48s

This commit is contained in:
Aiden
2026-05-11 00:26:59 +10:00
parent f6b26bf28b
commit 27dbb55f7b
10 changed files with 106 additions and 214 deletions

View File

@@ -4,6 +4,7 @@
#include "OscServer.h"
#include "RuntimeControlBridge.h"
#include "RuntimeHost.h"
#include "RuntimeStore.h"
#include <windows.h>
ControlServices::ControlServices() :
@@ -34,9 +35,9 @@ bool ControlServices::Start(OpenGLComposite& composite, RuntimeHost& runtimeHost
return true;
}
void ControlServices::BeginPolling(RuntimeHost& runtimeHost)
void ControlServices::BeginPolling(RuntimeHost& runtimeHost, RuntimeStore& runtimeStore)
{
StartPolling(runtimeHost);
StartPolling(runtimeHost, runtimeStore);
}
void ControlServices::Stop()
@@ -174,12 +175,12 @@ RuntimePollEvents ControlServices::ConsumePollEvents()
return events;
}
void ControlServices::StartPolling(RuntimeHost& runtimeHost)
void ControlServices::StartPolling(RuntimeHost& runtimeHost, RuntimeStore& runtimeStore)
{
if (mPollRunning.exchange(true))
return;
mPollThread = std::thread([this, &runtimeHost]() { PollLoop(runtimeHost); });
mPollThread = std::thread([this, &runtimeHost, &runtimeStore]() { PollLoop(runtimeHost, runtimeStore); });
}
void ControlServices::StopPolling()
@@ -191,7 +192,7 @@ void ControlServices::StopPolling()
mPollThread.join();
}
void ControlServices::PollLoop(RuntimeHost& runtimeHost)
void ControlServices::PollLoop(RuntimeHost& runtimeHost, RuntimeStore& runtimeStore)
{
while (mPollRunning)
{
@@ -203,7 +204,7 @@ void ControlServices::PollLoop(RuntimeHost& runtimeHost)
for (const auto& entry : pendingCommits)
{
std::string commitError;
if (runtimeHost.UpdateLayerParameterByControlKey(
if (runtimeStore.SetStoredParameterValueByControlKey(
entry.second.layerKey,
entry.second.parameterKey,
entry.second.value,