aboutsummaryrefslogtreecommitdiff
path: root/src/survive_cal.c
diff options
context:
space:
mode:
authorcnlohr <lohr85@gmail.com>2017-02-25 23:52:48 -0500
committercnlohr <lohr85@gmail.com>2017-02-25 23:52:48 -0500
commit55cedfc6a6b035d6eb54457782818fef61cae500 (patch)
treeca11020aeb8970830a6f52ada199767686078fd4 /src/survive_cal.c
parentf92f5dc93cbb53a99da51984541a7e4a70605639 (diff)
downloadlibsurvive-55cedfc6a6b035d6eb54457782818fef61cae500.tar.gz
libsurvive-55cedfc6a6b035d6eb54457782818fef61cae500.tar.bz2
Huge shift: Put HTC vive into its own file, to free up the rest of the system for libsurvive.
Diffstat (limited to 'src/survive_cal.c')
-rw-r--r--src/survive_cal.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/survive_cal.c b/src/survive_cal.c
index 760692c..2ed1986 100644
--- a/src/survive_cal.c
+++ b/src/survive_cal.c
@@ -96,6 +96,14 @@ void survive_cal_install( struct SurviveContext * ctx )
cd->stage = 1;
cd->ctx = ctx;
+ cd->hmd = survive_get_so_by_name( ctx, "HMD" );
+ if( !cd->hmd )
+ {
+ SV_ERROR( "Error: cannot find any devices labeled HMD. Required for calibration" );
+ free( cd );
+ return;
+ }
+
ootx_packet_clbk = ootx_packet_clbk_d;
ctx->calptr = cd;