From 0c55e1ef9b531584c2ea38f3e926bf1920bba8c8 Mon Sep 17 00:00:00 2001 From: Lena Date: Sat, 17 Feb 2024 20:26:09 +0100 Subject: [PATCH] fix chainloader --- ctru-rs/src/services/apt.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/ctru-rs/src/services/apt.rs b/ctru-rs/src/services/apt.rs index fa26470..6bbe075 100644 --- a/ctru-rs/src/services/apt.rs +++ b/ctru-rs/src/services/apt.rs @@ -146,8 +146,9 @@ impl<'a> Chainloader<'a> { /// Checks if the chainloader is set #[doc(alias = "aptIsChainload")] - pub fn is_set(&mut self) { - //unsafe { ctru_sys::aptIsChainload() } + pub fn is_set(&self) -> bool { + // static funtion not exported + unsafe { (ctru_sys::envGetSystemRunFlags() & ctru_sys::RUNFLAG_APTCHAINLOAD) != 0 } } /// Clears the chainloader state.