Skip to content

Commit

Permalink
merge
Browse files Browse the repository at this point in the history
  • Loading branch information
thecaptury committed Feb 19, 2025
2 parents 1d56677 + e393785 commit f1b5fee
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 11 deletions.
14 changes: 7 additions & 7 deletions RemoteCaptury.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -566,8 +566,8 @@ const char* Captury_getHumanReadableMessageType(CapturyPacketTypes type)
return "<get framerate>";
case capturyFramerate:
return "<framerate>";
case capturyBoneTypes:
return "<bone types>"
case CapturyBoneTypes:
return "<bone types>";
}
return "<unknown message type>";
}
Expand Down Expand Up @@ -1077,7 +1077,7 @@ static bool receive(SOCKET& sok)
at += size;
toGet = std::min<int>(p->size, (int)buffer.size()) - at;
}
size = std::min<int>(p->size, buffer.size());
size = std::min<int>(p->size, (int)buffer.size());
}

// log("received packet size %d type %d (expected %d)\n", size, p->type, expect);
Expand Down Expand Up @@ -1284,15 +1284,15 @@ static bool receive(SOCKET& sok)
for (int i = 0; i < actor->numBlendShapes; ++i) {
strncpy(actor->blendShapes[i].name, at, 63);
actor->blendShapes[i].name[63] = '\0';
at += std::min<int>(strlen(actor->blendShapes[i].name) + 1, 64);
at += std::min<int>((int)strlen(actor->blendShapes[i].name) + 1, 64);
}
unlockMutex(&mutex);
break; }
case capturyBoneTypes: {
CapturyBoneTypesPacket* cbt = (CapturyBoneTypesPacket*)p;
case CapturyBoneTypes: {
CapturyBoneTypePacket* cbt = (CapturyBoneTypePacket*)p;
lockMutex(&mutex);
CapturyActor_p actor = actorsById[cbt->actorId];
for (int i = 0; i < std::min<int>(actor->numJoints, size - sizeof(CapturyBoneTypesPacket)); ++i)
for (int i = 0; i < std::min<int>(actor->numJoints, size - sizeof(CapturyBoneTypePacket)); ++i)
actor->joints[i].boneType = cbt->boneTypes[i];
unlockMutex(&mutex);
break; }
Expand Down
6 changes: 3 additions & 3 deletions RemoteCaptury.h
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ typedef enum { capturyActors = 1, capturyActor = 2,
capturyDisableRemoteLogging = 77,
capturyGetFramerate = 78,
capturyFramerate = 79,
capturyBoneTypes = 80,
CapturyBoneTypes = 80,
capturyError = 0 } CapturyPacketTypes;

// returns a string for nicer error messages
Expand Down Expand Up @@ -943,8 +943,8 @@ struct CapturyFrameratePacket {
};

// sent to client
struct CapturyBoneTypesPacket {
int32_t type; // capturyBoneIndices
struct CapturyBoneTypePacket {
int32_t type; // capturyBoneTypes
int32_t size; // size of full message including type and size

int32_t actorId;
Expand Down
2 changes: 1 addition & 1 deletion captury/PublicStructs.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ enum CapturyBoneType {
CAPTURY_RIGHT_KNEE,
CAPTURY_RIGHT_ANKLE,
CAPTURY_RIGHT_BALL,
CAPTURY_RIGHT_TOES_END
CAPTURY_RIGH_TOES_END
};

struct CapturyJoint {
Expand Down

0 comments on commit f1b5fee

Please sign in to comment.