mirror of https://github.com/wayvr-org/wayvr.git
fix set_stereo
This commit is contained in:
parent
33ad05ee39
commit
0661af278b
|
|
@ -311,7 +311,6 @@ impl OverlayBackend for ScreenBackend {
|
|||
fn get_interaction_transform(&mut self) -> Option<Affine2> {
|
||||
self.interaction_transform
|
||||
}
|
||||
#[allow(unreachable_patterns)]
|
||||
fn get_attrib(&self, attrib: BackendAttrib) -> Option<BackendAttribValue> {
|
||||
match attrib {
|
||||
BackendAttrib::Stereo => self.stereo.map(BackendAttribValue::Stereo),
|
||||
|
|
@ -321,7 +320,6 @@ impl OverlayBackend for ScreenBackend {
|
|||
_ => None,
|
||||
}
|
||||
}
|
||||
#[allow(unreachable_patterns)]
|
||||
fn set_attrib(&mut self, app: &mut AppState, value: BackendAttribValue) -> bool {
|
||||
match value {
|
||||
BackendAttribValue::Stereo(new) => {
|
||||
|
|
|
|||
|
|
@ -97,6 +97,8 @@ impl ScreenPipeline {
|
|||
}
|
||||
|
||||
pub fn set_stereo(&mut self, app: &mut AppState, stereo: StereoMode) -> anyhow::Result<()> {
|
||||
self.stereo = stereo;
|
||||
|
||||
let depth = if matches!(stereo, StereoMode::None) {
|
||||
1
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Reference in New Issue