More details for mini version, make menubar variant specific

Signed-off-by: falkTX <falktx@falktx.com>
This commit is contained in:
falkTX 2022-12-29 15:33:16 +00:00
parent b71acc9f22
commit 91cac905cc
No known key found for this signature in database
GPG key ID: CDBAA37ABC74FBA0
17 changed files with 331 additions and 79 deletions

View file

@ -209,10 +209,15 @@ static void Engine_stepFrame(Engine* that) {
float smoothValue = internal->smoothValue;
Param* smoothParam = &smoothModule->params[smoothParamId];
float value = smoothParam->value;
// Use decay rate of roughly 1 graphics frame
const float smoothLambda = 60.f;
float newValue = value + (smoothValue - value) * smoothLambda * internal->sampleTime;
if (value == newValue) {
float newValue;
if (internal->blockFrames != 1) {
// Use decay rate of roughly 1 graphics frame
const float smoothLambda = 60.f;
newValue = value + (smoothValue - value) * smoothLambda * internal->sampleTime;
} else {
newValue = value;
}
if (d_isEqual(value, newValue)) {
// Snap to actual smooth value if the value doesn't change enough (due to the granularity of floats)
smoothParam->setValue(smoothValue);
internal->smoothModule = NULL;