Safety fixes

For OpenVR needs to be both initialized before Vulkan is, and shut
down before Vulkan is.
This commit is contained in:
Benjamin Saunders
2017-07-23 16:32:33 -07:00
parent d6d3b40fc3
commit d20c4de1c5
2 changed files with 31 additions and 9 deletions

View File

@ -16,7 +16,7 @@ fn print_matrix_4x3(offset: u32, mat: [[f32; 4]; 3]) {
}
fn main() {
let context = match openvr::init(openvr::ApplicationType::Other) {
let context = match unsafe { openvr::init(openvr::ApplicationType::Other) } {
Ok(ivr) => ivr,
Err(err) => {
println!("Failed to initialize openvr {:?}", err);