preset: fix wrong scale type when x/y scale specified
This commit is contained in:
parent
1c18faa83e
commit
cc295133c0
|
@ -34,7 +34,7 @@ mod test {
|
||||||
#[test]
|
#[test]
|
||||||
pub fn parse_preset() {
|
pub fn parse_preset() {
|
||||||
let root =
|
let root =
|
||||||
PathBuf::from("test/slang-shaders/bezel/Mega_Bezel/Presets/Base_CRT_Presets/MBZ__3__STD__MEGATRON-NTSC.slangp");
|
PathBuf::from("test/slang-shaders/ntsc/ntsc-256px-svideo.slangp");
|
||||||
let basic = Preset::try_parse(root);
|
let basic = Preset::try_parse(root);
|
||||||
eprintln!("{:#?}", basic);
|
eprintln!("{:#?}", basic);
|
||||||
assert!(basic.is_ok());
|
assert!(basic.is_ok());
|
||||||
|
|
|
@ -72,12 +72,12 @@ pub fn resolve_values(mut values: Vec<Value>) -> Preset {
|
||||||
});
|
});
|
||||||
|
|
||||||
let mut scale_type_x = shader_values.iter().find_map(|f| match f {
|
let mut scale_type_x = shader_values.iter().find_map(|f| match f {
|
||||||
Value::ScaleType(_, value) => Some(*value),
|
Value::ScaleTypeX(_, value) => Some(*value),
|
||||||
_ => None,
|
_ => None,
|
||||||
});
|
});
|
||||||
|
|
||||||
let mut scale_type_y = shader_values.iter().find_map(|f| match f {
|
let mut scale_type_y = shader_values.iter().find_map(|f| match f {
|
||||||
Value::ScaleType(_, value) => Some(*value),
|
Value::ScaleTypeY(_, value) => Some(*value),
|
||||||
_ => None,
|
_ => None,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue