From 15c662d9f60490261b3c3f08afc60e327d48bed1 Mon Sep 17 00:00:00 2001 From: Colin Sherratt Date: Tue, 18 Mar 2014 17:44:09 -0400 Subject: [PATCH] fixed oculus info --- configure | 3 ++- src/oculus-info/main.rs | 2 +- src/oculus-vr/info.rs | 33 --------------------------------- src/oculus-vr/lib.rs | 2 -- src/steamworks-vr/Makefile | 6 +++--- 5 files changed, 6 insertions(+), 40 deletions(-) delete mode 100644 src/oculus-vr/info.rs diff --git a/configure b/configure index 269340d..6d14b34 100755 --- a/configure +++ b/configure @@ -173,7 +173,8 @@ modules = [Bin("oculus-info", ["oculus-vr"]), Lib("oculus-vr", ["cgmath", "libovr_wrapper.a"]), LibMakefile("libovr_wrapper.a", "src/oculus-vr/", "src/oculus-vr/libovr_wrapper.a", ["libovr.a"]), LibMakefile("libovr.a", "thirdparty/OculusSDK/", "thirdparty/OculusSDK/LibOVR/Lib/Linux/Release/x86_64/libovr.a"), - Lib("steamworks-vr", ["cgmath"]), + Lib("steamworks-vr", ["cgmath", "libsteamvr_wrapper.a"]), + LibMakefile("libsteamvr_wrapper.a", "src/steamworks-vr/", "src/steamworks-vr/libsteamvr_wrapper.a"), Lib("cgmath")] diff --git a/src/oculus-info/main.rs b/src/oculus-info/main.rs index 896132f..7f8d4c0 100644 --- a/src/oculus-info/main.rs +++ b/src/oculus-info/main.rs @@ -1,4 +1,4 @@ - +#[crate_id = "oculus-info#0.1"]; extern crate ovr = "oculus-vr"; diff --git a/src/oculus-vr/info.rs b/src/oculus-vr/info.rs deleted file mode 100644 index 4909546..0000000 --- a/src/oculus-vr/info.rs +++ /dev/null @@ -1,33 +0,0 @@ - - -extern mod ovr = "ovr-rs"; - -fn main() -{ - ovr::init(); - - let dm = ovr::DeviceManager::new().unwrap(); - let dev = dm.enumerate().unwrap(); - let info = dev.get_info().unwrap(); - - let sf = ovr::SensorFusion::new().unwrap(); - let sensor = dev.get_sensor().unwrap(); - - sf.attach_to_sensor(&sensor); - - match info.resolution() { - (w, h) => println!("Resolution: {}x{}", w, h) - }; - match info.size() { - (w, h) => println!("Size: {}x{}", w, h) - }; - - println!("Vertical Center: {}", info.vertical_center()); - println!("Eye to screen distance: {}", info.eye_to_screen_distance()); - println!("Lens separation distance: {}", info.lens_separation_distance()); - println!("Interpupillary distance: {}", info.interpupillary_distance()); - println!("distortion K: {:?}", info.distortion_K()); - println!("Chroma Ab Correction: {:?}", info.chroma_ab_correction()); - println!("display name: {:s}", info.name()); - println!("display id: {:?}", info.id()); -} \ No newline at end of file diff --git a/src/oculus-vr/lib.rs b/src/oculus-vr/lib.rs index 70a3ad6..722ec5e 100644 --- a/src/oculus-vr/lib.rs +++ b/src/oculus-vr/lib.rs @@ -209,7 +209,6 @@ impl HMDDevice { pub fn get_info(&self) -> HMDInfo { unsafe { - println!("{:?}", self); HMDInfo{ dat: ll::OVR_HMDDevice_GetDeviceInfo(self.ptr) } @@ -219,7 +218,6 @@ impl HMDDevice { pub fn get_sensor(&self) -> Option { unsafe { - println!("{:?}", self); let ptr = ll::OVR_HMDDevice_GetSensor(self.ptr); if ptr.is_null() { diff --git a/src/steamworks-vr/Makefile b/src/steamworks-vr/Makefile index b6d44ac..0278895 100644 --- a/src/steamworks-vr/Makefile +++ b/src/steamworks-vr/Makefile @@ -1,6 +1,6 @@ -LIBSTEAMVR_INCLUDE_PATH=../thirdparty/Steamworks/public/steam/ -LIBSTEAMVR_LIB_PATH=../thirdparty/Steamworks/redistributable_bin/linux64/ +LIBSTEAMVR_INCLUDE_PATH=../../thirdparty/steamworks-vr-api/public/headers/ +LIBSTEAMVR_LIB_PATH=../../thirdparty/steamworks-vr-api/redistributable_bin/linux64/ all: libsteamvr_wrapper.a @@ -8,4 +8,4 @@ libsteamvr_wrapper.a: wrapper.o ar rcs libsteamvr_wrapper.a wrapper.o wrapper.o: wrapper.cpp - g++ -fPIC -I $(LIBSTEAMVR_INCLUDE_PATH) -DGNUC -DSTEAMWORKS -c -o wrapper.o wrapper.cpp \ No newline at end of file + g++ -fPIC -I $(LIBSTEAMVR_INCLUDE_PATH) -DGNUC -c -o wrapper.o wrapper.cpp \ No newline at end of file