NO_VR env var for monitor only mode

This commit is contained in:
2016-10-13 01:46:47 -07:00
parent 381157c8e2
commit f2a645730c
4 changed files with 73 additions and 44 deletions

View File

@@ -201,7 +201,7 @@ impl<D: gfx::Device,
}
fn update(&mut self,
vr: &mut vr::VR,
vr: &mut Option<vr::VR>,
encoder: &mut gfx::Encoder<D::Resources, D::CommandBuffer>) {
const NANOS_PER_MILLI: u32 = 1_000_000;
const MILLIS_PER_SEC: u64 = 1_000;
@@ -210,7 +210,7 @@ impl<D: gfx::Device,
for (pad, track) in self.pads.iter_mut() {
let mode = track.0;
if let Some(state) = vr.get_controller_state(*pad) {
if let Some(state) = vr.as_ref().and_then(|vr| vr.get_controller_state(*pad)) {
if let Some(old_state) = track.1 {
match mode {
TrackMode::Touch => {