From 282044068b38a771f32cda7839ff1aef435a9798 Mon Sep 17 00:00:00 2001 From: AzureMarker Date: Sat, 5 Feb 2022 17:38:33 -0800 Subject: [PATCH] Use the new Ps struct --- ctru-rs/examples/futures-tokio-basic.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ctru-rs/examples/futures-tokio-basic.rs b/ctru-rs/examples/futures-tokio-basic.rs index cf70a85..5260e7d 100644 --- a/ctru-rs/examples/futures-tokio-basic.rs +++ b/ctru-rs/examples/futures-tokio-basic.rs @@ -1,5 +1,6 @@ use ctru::console::Console; use ctru::services::hid::KeyPad; +use ctru::services::ps::Ps; use ctru::services::{Apt, Hid}; use ctru::Gfx; use std::time::Duration; @@ -9,11 +10,9 @@ fn main() { let gfx = Gfx::default(); let hid = Hid::init().expect("Couldn't obtain HID controller"); let apt = Apt::init().expect("Couldn't obtain APT controller"); + let _ps = Ps::init().expect("Couldn't initialize PS service"); let _console = Console::init(gfx.top_screen.borrow_mut()); - // FIXME: replace this with `Ps` when #39 merges - assert!(unsafe { ctru_sys::psInit() } >= 0); - // Give ourselves up to 30% of the system core's time apt.set_app_cpu_time_limit(30) .expect("Failed to enable system core");