fix set_stereo
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user