From ba0f8de3a0eccb5c71db9e476d42830b36c0a668 Mon Sep 17 00:00:00 2001 From: tt2468 Date: Wed, 13 May 2020 19:06:54 -0700 Subject: [PATCH] libobs: Return target instead of current in calc_torquef If the previously calculated torque value is too close to 1.0 (but not considered 1.0), it would be impossible for the TBar to finish its transition since it returned the old value, causing desync. --- libobs/graphics/math-extra.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libobs/graphics/math-extra.c b/libobs/graphics/math-extra.c index 3095a9cb9..aeaef6b8b 100644 --- a/libobs/graphics/math-extra.c +++ b/libobs/graphics/math-extra.c @@ -72,7 +72,7 @@ float calc_torquef(float val1, float val2, float torque, float min_adjust, bool over; if (close_float(val1, val2, EPSILON)) - return val1; + return val2; dist = (val2 - val1) * torque; over = dist > 0.0f;