fix return calls to use scalar5 instead of scalar2

This commit is contained in:
bunnie 2025-02-26 14:37:20 +08:00
parent 4096b35fef
commit f5473868b1

View file

@ -231,7 +231,7 @@ impl Gfx {
Message::new_blocking_scalar(GfxOpcode::ScreenSize.to_usize().unwrap(), 0, 0, 0, 0), Message::new_blocking_scalar(GfxOpcode::ScreenSize.to_usize().unwrap(), 0, 0, 0, 0),
) )
.expect("ScreenSize message failed"); .expect("ScreenSize message failed");
if let xous::Result::Scalar2(x, y) = response { if let xous::Result::Scalar5(_, x, y, _, _) = response {
Ok(Point::new(x as _, y as _)) Ok(Point::new(x as _, y as _))
} else { } else {
panic!("unexpected return value: {:#?}", response); panic!("unexpected return value: {:#?}", response);
@ -262,7 +262,7 @@ impl Gfx {
), ),
) )
.expect("QueryGlyphProps failed"); .expect("QueryGlyphProps failed");
if let xous::Result::Scalar2(_, h) = response { if let xous::Result::Scalar5(_, _, h, _, _) = response {
Ok(h) Ok(h)
} else { } else {
panic!("unexpected return value: {:#?}", response); panic!("unexpected return value: {:#?}", response);