Skip to content

Commit

Permalink
copy of collabora#302
Browse files Browse the repository at this point in the history
  • Loading branch information
Thomas Thron committed Oct 21, 2024
1 parent 4fb6d88 commit 1d5949d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/driver_vive.c
Original file line number Diff line number Diff line change
Expand Up @@ -583,7 +583,7 @@ void vive_switch_mode(struct SurviveUSBInfo *driverInfo, enum LightcapMode light
SurviveObject *w = driverInfo->so;
if (driverInfo->timeWithoutFlag == 0) {
driverInfo->timeWithoutFlag = 1;
uint8_t buffer[9] = {0};
uint8_t buffer[64] = {0};
size_t buffer_length = 0;
if (survive_device_is_rf(driverInfo->device_info)) {
buffer[0] = VIVE_REPORT_COMMAND;
Expand All @@ -596,11 +596,11 @@ void vive_switch_mode(struct SurviveUSBInfo *driverInfo, enum LightcapMode light
buffer[6] = 2;
buffer[7] = lightcapMode == LightcapMode_raw2 ? 1 : 0;
buffer[8] = 0;
buffer_length = 9;
buffer_length = 64;
} else {
buffer[0] = VIVE_REPORT_CHANGE_MODE;
buffer[1] = (lightcapMode == LightcapMode_raw1) ? 1 : (lightcapMode == LightcapMode_raw2) ? 3 : 0;
buffer_length = 5;
buffer_length = 64;
}

if (driverInfo->handle) {
Expand Down

0 comments on commit 1d5949d

Please sign in to comment.