diff --git a/services/graphics-server/src/lib.rs b/services/graphics-server/src/lib.rs index fe1e6b011..82553865b 100644 --- a/services/graphics-server/src/lib.rs +++ b/services/graphics-server/src/lib.rs @@ -2,6 +2,7 @@ pub mod api; pub use api::{Point, Color, Rect}; +use xous::String; use xous::{send_message, CID}; @@ -29,6 +30,6 @@ pub fn clear_region(cid: CID, x0: usize, y0: usize, x1: usize, y1: usize) -> Res send_message(cid, api::Opcode::ClearRegion(Rect::new(x0 as _, y0 as _, x1 as _, y1 as _)).into()).map(|_| ()) } -pub fn draw_string(cid: CID, s: &str) -> Result<(), xous::Error> { - send_message(cid, api::Opcode::String(s).into()).map(|_| ()) +pub fn draw_string(cid: CID, s: &String) -> Result<(), xous::Error> { + s.lend(cid, 1).map(|_| ()) }