summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-02-17 05:43:31 +0100
committerStanislaw Halik <sthalik@misaki.pl>2015-02-17 05:43:31 +0100
commit0c3b7542d56bcd463951a122772758bc30cc22a6 (patch)
treee9289e075991d7026b04898208e92fe74cf73f17
parent89afdb5176d7e36ed37cf2d33592a81f6527e0fc (diff)
parent7bc719e01816501afbc217ca29e5a78b9998b172 (diff)
Merge branch 'unstable' of github.com:opentrack/opentrack into unstable
-rw-r--r--CMakeLists.txt2
-rw-r--r--qfunctionconfigurator/functionconfig.cpp8
2 files changed, 7 insertions, 3 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 335eab80..33b2c7a7 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -91,7 +91,7 @@ macro(opentrack_library n dir)
target_link_libraries(${n} ${MY_QT_LIBS})
if(CMAKE_COMPILER_IS_GNUCXX AND NOT APPLE)
SET_TARGET_PROPERTIES(${n} PROPERTIES
- LINK_FLAGS "${foolib_LINK} -Wl,--version-script=${CMAKE_SOURCE_DIR}/opentrack/${version-script}-version-script.txt"
+ LINK_FLAGS "${foolib_LINK} -Wl,--version-script=\"${CMAKE_SOURCE_DIR}/opentrack/${version-script}-version-script.txt\""
COMPILE_FLAGS "${foolib_COMPILE} -fvisibility=hidden -fvisibility-inlines-hidden"
)
else()
diff --git a/qfunctionconfigurator/functionconfig.cpp b/qfunctionconfigurator/functionconfig.cpp
index 4f808c80..e4a7e283 100644
--- a/qfunctionconfigurator/functionconfig.cpp
+++ b/qfunctionconfigurator/functionconfig.cpp
@@ -24,8 +24,12 @@ Map::Map() :
float Map::getValue(float x) {
QMutexLocker foo(&_mutex);
- int x2 = x * (double) MEMOIZE_PRECISION;
- float ret = getValueInternal(x2);
+ double q = x * (double) MEMOIZE_PRECISION;
+ int xi = (int)q;
+ float yi = getValueInternal(xi);
+ float yiplus1 = getValueInternal(xi+1);
+ float f = (q-xi);
+ float ret = yiplus1 * f + yi * (1.0f - f); // at least do a linear interpolation.
last_input_value.setX(x);
last_input_value.setY(ret);
return ret;