Phase 1 clean-up and separation of concerns
All checks were successful
CI / React UI Build (push) Successful in 10s
CI / Native Windows Build And Tests (push) Successful in 2m34s
CI / Windows Release Package (push) Successful in 2m42s

This commit is contained in:
Aiden
2026-05-10 23:21:13 +10:00
parent 3629227aa9
commit 739231d5a1
24 changed files with 1043 additions and 449 deletions

View File

@@ -3,22 +3,22 @@
std::string OpenGLComposite::GetRuntimeStateJson() const
{
return mRuntimeStore ? mRuntimeStore->BuildStateJson() : "{}";
return mRuntimeStore ? mRuntimeStore->BuildPersistentStateJson() : "{}";
}
unsigned short OpenGLComposite::GetControlServerPort() const
{
return mRuntimeStore ? mRuntimeStore->GetServerPort() : 0;
return mRuntimeStore ? mRuntimeStore->GetConfiguredControlServerPort() : 0;
}
unsigned short OpenGLComposite::GetOscPort() const
{
return mRuntimeStore ? mRuntimeStore->GetOscPort() : 0;
return mRuntimeStore ? mRuntimeStore->GetConfiguredOscPort() : 0;
}
std::string OpenGLComposite::GetOscBindAddress() const
{
return mRuntimeStore ? mRuntimeStore->GetOscBindAddress() : "127.0.0.1";
return mRuntimeStore ? mRuntimeStore->GetConfiguredOscBindAddress() : "127.0.0.1";
}
std::string OpenGLComposite::GetControlUrl() const
@@ -38,7 +38,7 @@ std::string OpenGLComposite::GetOscAddress() const
bool OpenGLComposite::AddLayer(const std::string& shaderId, std::string& error)
{
if (!mRuntimeStore->AddLayer(shaderId, error))
if (!mRuntimeStore->CreateStoredLayer(shaderId, error))
return false;
ReloadShader(true);
@@ -48,7 +48,7 @@ bool OpenGLComposite::AddLayer(const std::string& shaderId, std::string& error)
bool OpenGLComposite::RemoveLayer(const std::string& layerId, std::string& error)
{
if (!mRuntimeStore->RemoveLayer(layerId, error))
if (!mRuntimeStore->DeleteStoredLayer(layerId, error))
return false;
ReloadShader(true);
@@ -58,7 +58,7 @@ bool OpenGLComposite::RemoveLayer(const std::string& layerId, std::string& error
bool OpenGLComposite::MoveLayer(const std::string& layerId, int direction, std::string& error)
{
if (!mRuntimeStore->MoveLayer(layerId, direction, error))
if (!mRuntimeStore->MoveStoredLayer(layerId, direction, error))
return false;
ReloadShader(true);
@@ -68,7 +68,7 @@ bool OpenGLComposite::MoveLayer(const std::string& layerId, int direction, std::
bool OpenGLComposite::MoveLayerToIndex(const std::string& layerId, std::size_t targetIndex, std::string& error)
{
if (!mRuntimeStore->MoveLayerToIndex(layerId, targetIndex, error))
if (!mRuntimeStore->MoveStoredLayerToIndex(layerId, targetIndex, error))
return false;
ReloadShader(true);
@@ -78,7 +78,7 @@ bool OpenGLComposite::MoveLayerToIndex(const std::string& layerId, std::size_t t
bool OpenGLComposite::SetLayerBypass(const std::string& layerId, bool bypassed, std::string& error)
{
if (!mRuntimeStore->SetLayerBypass(layerId, bypassed, error))
if (!mRuntimeStore->SetStoredLayerBypassState(layerId, bypassed, error))
return false;
ReloadShader();
@@ -88,7 +88,7 @@ bool OpenGLComposite::SetLayerBypass(const std::string& layerId, bool bypassed,
bool OpenGLComposite::SetLayerShader(const std::string& layerId, const std::string& shaderId, std::string& error)
{
if (!mRuntimeStore->SetLayerShader(layerId, shaderId, error))
if (!mRuntimeStore->SetStoredLayerShaderSelection(layerId, shaderId, error))
return false;
ReloadShader();
@@ -102,7 +102,7 @@ bool OpenGLComposite::UpdateLayerParameterJson(const std::string& layerId, const
if (!ParseJson(valueJson, parsedValue, error))
return false;
if (!mRuntimeStore->UpdateLayerParameter(layerId, parameterId, parsedValue, error))
if (!mRuntimeStore->SetStoredParameterValue(layerId, parameterId, parsedValue, error))
return false;
broadcastRuntimeState();
@@ -115,7 +115,7 @@ bool OpenGLComposite::UpdateLayerParameterByControlKeyJson(const std::string& la
if (!ParseJson(valueJson, parsedValue, error))
return false;
if (!mRuntimeStore->UpdateLayerParameterByControlKey(layerKey, parameterKey, parsedValue, error))
if (!mRuntimeStore->SetStoredParameterValueByControlKey(layerKey, parameterKey, parsedValue, error))
return false;
broadcastRuntimeState();
@@ -124,7 +124,7 @@ bool OpenGLComposite::UpdateLayerParameterByControlKeyJson(const std::string& la
bool OpenGLComposite::ResetLayerParameters(const std::string& layerId, std::string& error)
{
if (!mRuntimeStore->ResetLayerParameters(layerId, error))
if (!mRuntimeStore->ResetStoredLayerParameterValues(layerId, error))
return false;
mOscOverlayStates.clear();
@@ -138,7 +138,7 @@ bool OpenGLComposite::ResetLayerParameters(const std::string& layerId, std::stri
bool OpenGLComposite::SaveStackPreset(const std::string& presetName, std::string& error)
{
if (!mRuntimeStore->SaveStackPreset(presetName, error))
if (!mRuntimeStore->SaveStackPresetSnapshot(presetName, error))
return false;
broadcastRuntimeState();
@@ -147,7 +147,7 @@ bool OpenGLComposite::SaveStackPreset(const std::string& presetName, std::string
bool OpenGLComposite::LoadStackPreset(const std::string& presetName, std::string& error)
{
if (!mRuntimeStore->LoadStackPreset(presetName, error))
if (!mRuntimeStore->LoadStackPresetSnapshot(presetName, error))
return false;
ReloadShader();