aboutsummaryrefslogtreecommitdiff
path: root/src/survive.c
diff options
context:
space:
mode:
authorJustin Berger <j.david.berger@gmail.com>2018-03-16 15:07:00 -0600
committerJustin Berger <j.david.berger@gmail.com>2018-03-16 15:07:00 -0600
commitc5fc97504a9e46f0370587ae39f4b6e10615f813 (patch)
tree696d48b99f41c10e81d775e567429361c35c4227 /src/survive.c
parentab218043f3d9ca6dd44f130a8c4255e102cb7a06 (diff)
downloadlibsurvive-c5fc97504a9e46f0370587ae39f4b6e10615f813.tar.gz
libsurvive-c5fc97504a9e46f0370587ae39f4b6e10615f813.tar.bz2
Playback now goes to a single file. Note that the file format changed too so that it always starts 'time' 'device name'
Diffstat (limited to 'src/survive.c')
-rwxr-xr-xsrc/survive.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/survive.c b/src/survive.c
index a27ba3e..bafacad 100755
--- a/src/survive.c
+++ b/src/survive.c
@@ -7,8 +7,9 @@
#include <stdlib.h>
#include <string.h>
-#include "survive_config.h"
#include "os_generic.h"
+#include "survive_config.h"
+#include "survive_default_devices.h"
#ifdef __APPLE__
#define z_const const
@@ -103,8 +104,7 @@ void survive_verify_FLT_size(uint32_t user_size) {
}
}
-SurviveContext * survive_init_internal( int headless )
-{
+SurviveContext *survive_init_internal(int headless, htc_config_func configFunc) {
#ifdef RUNTIME_SYMNUM
if( !did_runtime_symnum )
{
@@ -149,6 +149,7 @@ SurviveContext * survive_init_internal( int headless )
ctx->imuproc = survive_default_imu_process;
ctx->angleproc = survive_default_angle_process;
ctx->lighthouseposeproc = survive_default_lighthouse_pose_process;
+ ctx->configfunction = configFunc ? configFunc : survive_default_htc_config_process;
// initialize the button queue
memset(&(ctx->buttonQueue), 0, sizeof(ctx->buttonQueue));
@@ -212,6 +213,13 @@ void survive_install_info_fn( SurviveContext * ctx, text_feedback_func fbp )
ctx->notefunction = survivenote;
}
+void survive_install_htc_config_fn(SurviveContext *ctx, htc_config_func fbp) {
+ if (fbp)
+ ctx->configfunction = fbp;
+ else
+ ctx->configfunction = survive_default_htc_config_process;
+}
+
void survive_install_error_fn( SurviveContext * ctx, text_feedback_func fbp )
{
if( fbp )