diff options
author | Michael Turvey <mwturvey@users.noreply.github.com> | 2018-01-05 04:50:08 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-05 04:50:08 -0700 |
commit | 2b68b58bc55ffc4a08440b11558aa83974ae73d7 (patch) | |
tree | 58caa5f61f7d2daa494f6c2d7bd3914753a35c61 | |
parent | 3c64031e671e14eb3baf90ec12cfaa8c0ecb5eff (diff) | |
parent | deb657e885abc0abd98dbeee0a74f56f64d46754 (diff) | |
download | libsurvive-2b68b58bc55ffc4a08440b11558aa83974ae73d7.tar.gz libsurvive-2b68b58bc55ffc4a08440b11558aa83974ae73d7.tar.bz2 |
Merge pull request #92 from mwturvey/MakeTrackingGood
Remove dependency on GetSem to fix linux segfault
-rwxr-xr-x | src/survive_vive.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/survive_vive.c b/src/survive_vive.c index 9e4a8b8..65636cf 100755 --- a/src/survive_vive.c +++ b/src/survive_vive.c @@ -958,7 +958,7 @@ void incrementAndPostButtonQueue(SurviveContext *ctx) { ButtonQueueEntry *entry = &(ctx->buttonQueue.entry[ctx->buttonQueue.nextWriteIndex]); - if (OGGetSema(ctx->buttonQueue.buttonservicesem) >= BUTTON_QUEUE_MAX_LEN-1) + if ((ctx->buttonQueue.nextWriteIndex+1)% BUTTON_QUEUE_MAX_LEN == ctx->buttonQueue.nextReadIndex) { // There's not enough space to write this entry. Clear it out and move along //printf("Button Buffer Full\n"); |