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