diff --git a/libobs/graphics/math-extra.c b/libobs/graphics/math-extra.c index a32d28d2ebb769341c615d64da4c46f114e9aeb1..aa8311cd8189e312fb44a2755d50de20dea5bda5 100644 --- a/libobs/graphics/math-extra.c +++ b/libobs/graphics/math-extra.c @@ -111,11 +111,11 @@ void calc_torque(struct vec3 *dst, const struct vec3 *v1, vec3_mulf(&dir, &line, 1.0f/orig_dist); torque_dist = orig_dist*torque; /* use distance to determine speed */ - adjust_dist = torque_dist*t; - if (torque_dist < min_adjust) /* prevent from going too slow */ torque_dist = min_adjust; + adjust_dist = torque_dist*t; + if (adjust_dist <= (orig_dist-LARGE_EPSILON)) { vec3_mulf(dst, &dir, adjust_dist); vec3_add(dst, dst, v1); /* add torque */ diff --git a/obs/platform-osx.cpp b/obs/platform-osx.cpp index 88dd77cbdf2cd94d1c11573404e00f498b80cce4..ef425f90d95299e0fedfe8ebe654de88c570e6f9 100644 --- a/obs/platform-osx.cpp +++ b/obs/platform-osx.cpp @@ -18,8 +18,12 @@ #include #include "platform.hpp" +#include + bool GetDataFilePath(const char *data, string &output) { - // TODO - return false; + stringstream str; + str << "../data/obs-studio/" << data; + output = str.str(); + return !access(output.c_str(), R_OK); }