Fix missing EOL in server_namespace

This commit is contained in:
rodolpheh 2023-12-08 09:07:39 +00:00
parent 833b89337a
commit e46bc2e49f
1 changed files with 6 additions and 5 deletions

View File

@ -344,15 +344,16 @@ void UltraleapHandTracking::start() {
started = true;
LEAP_CONNECTION_CONFIG config;
LEAP_CONNECTION_CONFIG config = {0};
// Set connection to multi-device aware
memset(&config, 0, sizeof(config));
config.size = sizeof(config);
config.flags = eLeapConnectionConfig_MultiDeviceAware;
config.server_namespace = generate_connection_payload().utf8().get_data();
config.flags = (uint32_t)eLeapConnectionConfig_MultiDeviceAware;
if(connectionHandle || LeapCreateConnection(&config, &connectionHandle) == eLeapRS_Success) {
CharString server_namespace = generate_connection_payload().utf8();
config.server_namespace = server_namespace.get_data();
if (LeapCreateConnection(&config, &connectionHandle) == eLeapRS_Success) {
eLeapRS result = LeapOpenConnection(connectionHandle);
if(result == eLeapRS_Success) {
opened = true;