Don't treat invalid inputs as center panning
This commit is contained in:
parent
c2b530af36
commit
2911efaa79
|
@ -64,8 +64,9 @@ pub fn from_f32_panning() -> Arc<dyn Fn(&str) -> Option<f32> + Send + Sync> {
|
|||
let cleaned_string = string.trim_end_matches(&[' ', 'l', 'L']).parse().ok();
|
||||
match string.chars().last()?.to_uppercase().next()? {
|
||||
'L' => cleaned_string.map(|x: f32| x / -100.0),
|
||||
'C' => Some(0.0),
|
||||
'R' => cleaned_string.map(|x: f32| x / 100.0),
|
||||
_ => Some(0.0),
|
||||
_ => None,
|
||||
}
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue