Added a delay quirk to allow the Oculus Rift CV1 to initialize properly.

This commit is contained in:
Caleb Szalacinski 2019-06-18 20:36:43 -05:00
parent d30cd0b639
commit 6664588eba

View file

@ -213,6 +213,7 @@ struct device_info
bool video_distortion_vive;
bool left_center_pano_scale;
bool rotate_screen_right_after;
bool delay_after_initialization;
} quirks;
};
@ -265,6 +266,10 @@ get_info(struct oh_device *ohd, const char *prod)
info.quirks.video_distortion_none = true;
}
if (strcmp(prod, "Rift (CV1)") == 0) {
info.quirks.delay_after_initialization = true;
}
/*
* Assumptions made here:
@ -526,6 +531,13 @@ oh_device_create(ohmd_context *ctx,
ohd->base.hmd->views[1].rot = u_device_rotation_left;
}
if (info.quirks.delay_after_initialization) {
unsigned int time_to_sleep = 1;
do {
time_to_sleep = sleep(time_to_sleep);
} while (time_to_sleep);
}
if (ohd->print_debug) {
u_device_dump_config(&ohd->base, __func__, prod);
}