Update lib.rs

use a scalar message, instead of a null-body memory message
This commit is contained in:
bunnie 2022-10-19 01:29:27 +08:00 committed by GitHub
parent cf02c3c3b6
commit 371d058941
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -396,10 +396,9 @@ impl Gam {
}
/// Allows applications to "quit" and switch to a default application
pub fn request_default_app(&self) -> Result<(), xous::Error> {
let defaultapp = DefaultApp {
};
let buf = Buffer::into_buf(defaultapp).or(Err(xous::Error::InternalError))?;
buf.send(self.conn, Opcode::DefaultApp.to_u32().unwrap()).or(Err(xous::Error::InternalError)).map(|_|())
send_message(self.conn,
Message::new_scalar(Opcode::DefaultApp.to_usize().unwrap(), 0, 0, 0, 0)
).map(|_|())
}
pub fn raise_menu(&self, menu_name_str: &str) -> Result<(), xous::Error> {
let menu_name = GamActivation {