Adde Send+Sync to Hmd

This commit is contained in:
Colin Sherratt
2014-12-30 22:46:11 -05:00
parent b192789533
commit a4bf5675dc
2 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,6 @@ authors = [
build = "scripts/build.rs" build = "scripts/build.rs"
[lib] [lib]
name = "ovr" name = "ovr"
path = "src/oculus-vr/lib.rs" path = "src/oculus-vr/lib.rs"
@ -19,5 +18,4 @@ name = "oculus-info"
path = "src/oculus-info/main.rs" path = "src/oculus-info/main.rs"
[dependencies.cgmath] [dependencies.cgmath]
git = "https://github.com/bjz/cgmath-rs.git" git = "https://github.com/bjz/cgmath-rs.git"

View File

@ -402,6 +402,9 @@ pub struct Hmd {
ptr: *mut ll::Hmd ptr: *mut ll::Hmd
} }
unsafe impl Sync for Hmd {}
unsafe impl Send for Hmd {}
impl Drop for Hmd { impl Drop for Hmd {
fn drop(&mut self) { fn drop(&mut self) {
unsafe {ll::ovrHmd_Destroy(self.ptr)} unsafe {ll::ovrHmd_Destroy(self.ptr)}