aboutsummaryrefslogtreecommitdiff
path: root/test.c
diff options
context:
space:
mode:
authorMichael Turvey <mturvey6@gmail.com>2017-03-12 12:28:10 -0700
committerMichael Turvey <mturvey6@gmail.com>2017-03-12 12:28:10 -0700
commit121afb94493a7379ce39d76bffb61c898e6aebf0 (patch)
treee9abd71220f63e9a7ad55745131a25725e88e127 /test.c
parent0ed5073a47e9aad9f15db1adbaddd822871d981c (diff)
downloadlibsurvive-121afb94493a7379ce39d76bffb61c898e6aebf0.tar.gz
libsurvive-121afb94493a7379ce39d76bffb61c898e6aebf0.tar.bz2
More changes to gracefully support a tracker
Diffstat (limited to 'test.c')
-rwxr-xr-x[-rw-r--r--]test.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test.c b/test.c
index 9dc3631..a7da490 100644..100755
--- a/test.c
+++ b/test.c
@@ -17,6 +17,8 @@ static void dump_iface( struct SurviveObject * so, const char * prefix )
FILE * f;
char fname[1024];
+ if (!so) { return; }
+
sprintf( fname, "%s_points.csv", prefix );
f = fopen( fname, "w" );
for( i = 0; i < so->nr_locations; i++ )
@@ -53,6 +55,7 @@ int main()
dump_iface( survive_get_so_by_name( ctx, "HMD" ), "HMD" );
dump_iface( survive_get_so_by_name( ctx, "WM0" ), "WM0" );
dump_iface( survive_get_so_by_name( ctx, "WM1" ), "WM1" );
+ dump_iface( survive_get_so_by_name( ctx, "TR0" ), "TR0" );
while(survive_poll(ctx) == 0)
{