From fd5b00871f1885e29b323cb1d8b8dd5edb32e0cb Mon Sep 17 00:00:00 2001 From: Palana Date: Thu, 12 Dec 2013 11:44:17 +0100 Subject: [PATCH 1/2] add GetDataFilePath implementation for osx --- obs/platform-osx.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/obs/platform-osx.cpp b/obs/platform-osx.cpp index 88dd77cbd..ef425f90d 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); } From 3da014543e727f87df0e95d4e1ea4abb216425d3 Mon Sep 17 00:00:00 2001 From: Palana Date: Thu, 12 Dec 2013 23:57:36 +0100 Subject: [PATCH 2/2] fix min_adjust usage in calc_torque --- libobs/graphics/math-extra.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/libobs/graphics/math-extra.c b/libobs/graphics/math-extra.c index a32d28d2e..aa8311cd8 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 */