From ab04f21be18f48b44bd43a19db352541370f27a5 Mon Sep 17 00:00:00 2001 From: Dario Bartussek Date: Wed, 21 Apr 2021 13:23:01 +0200 Subject: Updated libctru bindings --- Cargo.toml | 2 +- src/lib.rs | 24 +++++++----------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index e2fa275..46d9202 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -17,4 +17,4 @@ panic = "abort" opt-level = "s" [dependencies] -libctru = { git = "https://github.com/dbartussek/libctru-rs.git" } +libctru = { path = "../libctru" } diff --git a/src/lib.rs b/src/lib.rs index b9cd4db..c77be23 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,10 +1,13 @@ #![feature(restricted_std)] -use core::ptr::null_mut; use libctru::raw::{ - aptMainLoop, c_char, c_int, consoleInit, gfxExit, gfxFlushBuffers, gfxInitDefault, - gfxScreen_t_GFX_BOTTOM, gfxScreen_t_GFX_TOP, gfxSwapBuffers, gspWaitForEvent, hidKeysDown, - hidScanInput, GSPGPU_Event_GSPGPU_EVENT_VBlank0, KEY_START, + aptMainLoop, consoleInit, gfxExit, gfxFlushBuffers, gfxInitDefault, gfxScreen_t_GFX_BOTTOM, + gfxSwapBuffers, gspWaitForEvent, hidKeysDown, hidScanInput, GSPGPU_Event_GSPGPU_EVENT_VBlank0, + KEY_START, +}; +use std::{ + os::raw::{c_char, c_int}, + ptr::null_mut, }; #[no_mangle] @@ -32,19 +35,6 @@ pub extern "C" fn main(_argc: c_int, _argv: *const *const c_char) -> c_int { unsafe { gfxInitDefault(); - consoleInit(gfxScreen_t_GFX_TOP, null_mut()); - - libctru::println!("Standard print in next line:"); - println!("Standard print"); - - std::thread::spawn(|| { - println!("Hello thread world"); - }) - .join() - .unwrap(); - - libctru::println!("Check end"); - while aptMainLoop() { hidScanInput(); let keys = hidKeysDown(); -- cgit v1.2.3