aboutsummaryrefslogtreecommitdiff
path: root/src/survive.c
diff options
context:
space:
mode:
authorMichael Turvey <mwturvey@users.noreply.github.com>2018-01-15 22:43:02 -0700
committerGitHub <noreply@github.com>2018-01-15 22:43:02 -0700
commit7755de9d2af61834568737594e29352b47176c7f (patch)
tree0d9eea391f3b266bcb80c47131092e0dbf317600 /src/survive.c
parent8be34f04a100defc9d1958aa4ce63ef02d19db69 (diff)
parentb2eb7569a8963917116c4520e15b17f0578a2509 (diff)
downloadlibsurvive-7755de9d2af61834568737594e29352b47176c7f.tar.gz
libsurvive-7755de9d2af61834568737594e29352b47176c7f.tar.bz2
Merge pull request #95 from mwturvey/SmallChange
Resolve warnings & remove survive.h dependency on redist
Diffstat (limited to 'src/survive.c')
-rwxr-xr-xsrc/survive.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/survive.c b/src/survive.c
index a5ca68f..0386275 100755
--- a/src/survive.c
+++ b/src/survive.c
@@ -8,6 +8,7 @@
#include <string.h>
#include "survive_config.h"
+#include "os_generic.h"
#ifdef __APPLE__
#define z_const const
@@ -40,7 +41,7 @@ static void survivenote( struct SurviveContext * ctx, const char * fault )
fprintf( stderr, "Info: %s\n", fault );
}
-static void button_servicer(void * context)
+static void *button_servicer(void * context)
{
SurviveContext *ctx = (SurviveContext*)context;
@@ -51,7 +52,7 @@ static void button_servicer(void * context)
if (ctx->isClosing)
{
// we're shutting down. Close.
- return;
+ return NULL;
}
ButtonQueueEntry *entry = &(ctx->buttonQueue.entry[ctx->buttonQueue.nextReadIndex]);
@@ -61,7 +62,7 @@ static void button_servicer(void * context)
// the buttonQueue
// if it does happen, it will kill all future button input
printf("ERROR: Unpopulated ButtonQueueEntry! NextReadIndex=%d\n", ctx->buttonQueue.nextReadIndex);
- return;
+ return NULL;
}
//printf("ButtonEntry: eventType:%x, buttonId:%d, axis1:%d, axis1Val:%8.8x, axis2:%d, axis2Val:%8.8x\n",
@@ -90,6 +91,7 @@ static void button_servicer(void * context)
ctx->buttonQueue.nextReadIndex = 0;
}
};
+ return NULL;
}
SurviveContext * survive_init( int headless )
@@ -182,7 +184,7 @@ SurviveContext * survive_init( int headless )
ctx->buttonQueue.buttonservicesem = OGCreateSema();
// start the thread to process button data
- ctx->buttonservicethread = OGCreateThread(&button_servicer, ctx);
+ ctx->buttonservicethread = OGCreateThread(button_servicer, ctx);
survive_install_button_fn(ctx, NULL);
survive_install_raw_pose_fn(ctx, NULL);