From a108c27a950d62e3ffede88958ddc7c39a7b58ac Mon Sep 17 00:00:00 2001 From: Elliot Woods Date: Wed, 15 Jan 2014 21:56:31 +0000 Subject: [PATCH] fixed 2 little bugs (wrong index of skeleton, wrong index of device), fixes #10 #8 #4 --- src/ofxKinectCommonBridge.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ofxKinectCommonBridge.cpp b/src/ofxKinectCommonBridge.cpp index 2d361cc..fc11121 100644 --- a/src/ofxKinectCommonBridge.cpp +++ b/src/ofxKinectCommonBridge.cpp @@ -284,7 +284,7 @@ void ofxKinectCommonBridge::update() for ( int j = 0; j < NUI_SKELETON_POSITION_COUNT; j++ ) { SkeletonBone bone( k4wSkeletons.SkeletonData[i].SkeletonPositions[j], bones[j] ); - ( skeletons.begin())->insert( std::pair( NUI_SKELETON_POSITION_INDEX(j), bone ) ); + skeletons.at(i).insert( std::pair( NUI_SKELETON_POSITION_INDEX(j), bone ) ); } bNeedsUpdateSkeleton = true; } @@ -427,7 +427,7 @@ bool ofxKinectCommonBridge::initSensor( int id ) UINT count = KinectGetPortIDCount(); WCHAR portID[KINECT_MAX_PORTID_LENGTH]; - if( !SUCCEEDED(KinectGetPortIDByIndex( 0, _countof(portID), portID ))) { + if( !SUCCEEDED(KinectGetPortIDByIndex( id, _countof(portID), portID ))) { ofLog() << " can't find kinect of ID " << id << endl; return false; }