summaryrefslogtreecommitdiff
path: root/src/lib.rs
diff options
context:
space:
mode:
authorDario Bartussek <[email protected]>2021-04-21 13:23:01 +0200
committerDario Bartussek <[email protected]>2021-04-21 13:23:01 +0200
commitab04f21be18f48b44bd43a19db352541370f27a5 (patch)
tree3038da55a9c26fdb707f52859cbd9897bbdfd8df /src/lib.rs
parentCustom std can now create threads and panic (diff)
downloadrust_3ds-2.5.1_custom_std.tar.xz
rust_3ds-2.5.1_custom_std.zip
Updated libctru bindingsHEAD2.5.1_custom_std
Diffstat (limited to 'src/lib.rs')
-rw-r--r--src/lib.rs24
1 files changed, 7 insertions, 17 deletions
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();