Browse Source

Ignore cable lights on headless build, for a bit more performance

Signed-off-by: falkTX <falktx@falktx.com>
tags/23.02
falkTX 2 years ago
parent
commit
5ff9a5118e
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
2 changed files with 5 additions and 1 deletions
  1. +1
    -1
      dpf
  2. +4
    -0
      src/override/Engine.cpp

+ 1
- 1
dpf

@@ -1 +1 @@
Subproject commit 0c75ecb5db751eda5d5d7168f5299274c050766c
Subproject commit 8d6748c502d8facf9dba71f1af2247f85dc938a3

+ 4
- 0
src/override/Engine.cpp View File

@@ -152,6 +152,7 @@ static void Cable_step(Cable* that) {
}


#ifndef HEADLESS
static void Port_step(Port* that, float deltaTime) {
// Set plug lights
if (that->channels == 0) {
@@ -172,6 +173,7 @@ static void Port_step(Port* that, float deltaTime) {
that->plugLights[2].setSmoothBrightness(v, deltaTime);
}
}
#endif


static void TerminalModule__doProcess(TerminalModule* terminalModule, const Module::ProcessArgs& args, bool input) {
@@ -186,6 +188,7 @@ static void TerminalModule__doProcess(TerminalModule* terminalModule, const Modu
terminalModule->processTerminalOutput(args);
}

#ifndef HEADLESS
// Iterate ports to step plug lights
if (args.frame % 7 /* PORT_DIVIDER */ == 0) {
float portTime = args.sampleTime * 7 /* PORT_DIVIDER */;
@@ -196,6 +199,7 @@ static void TerminalModule__doProcess(TerminalModule* terminalModule, const Modu
Port_step(&output, portTime);
}
}
#endif
}




Loading…
Cancel
Save