Fenrir
9 years ago
10 changed files with 137 additions and 62 deletions
@ -1,15 +1,18 @@
@@ -1,15 +1,18 @@
|
||||
[package] |
||||
name = "ctru-rs" |
||||
version = "0.2.0" |
||||
description = "A safe wrapper around smealum's ctrulib." |
||||
authors = ["Ronald Kinard <furyhunter600@gmail.com>"] |
||||
links = "ctru" |
||||
build = "build.rs" |
||||
description = "A safe wrapper around smealum's ctrulib." |
||||
license = "https://en.wikipedia.org/wiki/Zlib_License" |
||||
links = "ctru" |
||||
name = "ctru-rs" |
||||
version = "0.2.1" |
||||
|
||||
[dependencies] |
||||
rcstring = "0.2.1" |
||||
|
||||
[dependencies.ctru-sys] |
||||
path = "ctru-sys" |
||||
|
||||
[lib] |
||||
name = "ctru" |
||||
crate-type = ["rlib"] |
||||
|
||||
[dependencies] |
||||
ctru-sys = { path = "ctru-sys" } |
||||
name = "ctru" |
||||
|
@ -0,0 +1,17 @@
@@ -0,0 +1,17 @@
|
||||
use libctru::console::{PrintConsole, consoleInit}; |
||||
use libctru::gfx; |
||||
use rcstring::CString; |
||||
|
||||
use core::ptr; |
||||
|
||||
extern "C" { |
||||
fn puts(cstr: *const u8) -> u8; |
||||
} |
||||
|
||||
pub fn console_default_init() -> *mut PrintConsole { |
||||
unsafe { consoleInit(gfx::gfxScreen_t::GFX_TOP, ptr::null_mut()) } |
||||
} |
||||
|
||||
pub fn console_write<'a>(s: &'a str) -> u8 { |
||||
unsafe { puts(CString::new(s).unwrap().into_raw()) } |
||||
} |
@ -1,6 +1,6 @@
@@ -1,6 +1,6 @@
|
||||
pub mod apt; |
||||
pub mod hid; |
||||
pub mod gsp; |
||||
pub mod gspgpu; |
||||
|
||||
pub use self::hid::Hid; |
||||
pub use self::apt::{Apt, Application}; |
||||
|
Loading…
Reference in new issue