Skip to content

Commit 9d8ec46

Browse files
KoenigSimonbl4ckb0ne
authored andcommitted
change buffer size to 64 to allow protocol switching on windows
1 parent 4fb6d88 commit 9d8ec46

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/driver_vive.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -583,7 +583,7 @@ void vive_switch_mode(struct SurviveUSBInfo *driverInfo, enum LightcapMode light
583583
SurviveObject *w = driverInfo->so;
584584
if (driverInfo->timeWithoutFlag == 0) {
585585
driverInfo->timeWithoutFlag = 1;
586-
uint8_t buffer[9] = {0};
586+
uint8_t buffer[64] = {0};
587587
size_t buffer_length = 0;
588588
if (survive_device_is_rf(driverInfo->device_info)) {
589589
buffer[0] = VIVE_REPORT_COMMAND;
@@ -596,11 +596,11 @@ void vive_switch_mode(struct SurviveUSBInfo *driverInfo, enum LightcapMode light
596596
buffer[6] = 2;
597597
buffer[7] = lightcapMode == LightcapMode_raw2 ? 1 : 0;
598598
buffer[8] = 0;
599-
buffer_length = 9;
599+
buffer_length = 64;
600600
} else {
601601
buffer[0] = VIVE_REPORT_CHANGE_MODE;
602602
buffer[1] = (lightcapMode == LightcapMode_raw1) ? 1 : (lightcapMode == LightcapMode_raw2) ? 3 : 0;
603-
buffer_length = 5;
603+
buffer_length = 64;
604604
}
605605

606606
if (driverInfo->handle) {

0 commit comments

Comments
 (0)