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

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2023-01-04 13:04:05 +00:00
parent e418bb17c6
commit 5ff9a5118e
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
2 changed files with 5 additions and 1 deletions

2
dpf

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

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
}