fix set_stereo

This commit is contained in:
galister
2026-01-07 12:06:50 +09:00
parent 33ad05ee39
commit 0661af278b
2 changed files with 2 additions and 2 deletions

View File

@@ -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) => {

View File

@@ -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 {