Skip to content

Commit

Permalink
fixed 2 little bugs (wrong index of skeleton, wrong index of device), f…
Browse files Browse the repository at this point in the history
  • Loading branch information
elliotwoods committed Jan 15, 2014
1 parent abd532d commit a108c27
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/ofxKinectCommonBridge.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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, SkeletonBone>( NUI_SKELETON_POSITION_INDEX(j), bone ) );
skeletons.at(i).insert( std::pair<NUI_SKELETON_POSITION_INDEX, SkeletonBone>( NUI_SKELETON_POSITION_INDEX(j), bone ) );
}
bNeedsUpdateSkeleton = true;
}
Expand Down Expand Up @@ -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;
}
Expand Down

0 comments on commit a108c27

Please sign in to comment.