Browse Source

Update bindings to latest libctru

pull/125/head
Andrea Ciliberti 2 years ago
parent
commit
fbfe34605c
  1. 2
      ctru-rs/Cargo.toml
  2. 2
      ctru-sys/Cargo.toml
  3. 4
      ctru-sys/src/bindings.rs
  4. 9
      ctru-sys/src/lib.rs

2
ctru-rs/Cargo.toml

@ -13,7 +13,7 @@ name = "ctru"
[dependencies] [dependencies]
cfg-if = "1.0" cfg-if = "1.0"
ctru-sys = { path = "../ctru-sys", version = "22.0" } ctru-sys = { path = "../ctru-sys", version = "22.2" }
const-zero = "0.1.0" const-zero = "0.1.0"
shim-3ds = { git = "https://github.com/rust3ds/shim-3ds.git" } shim-3ds = { git = "https://github.com/rust3ds/shim-3ds.git" }
pthread-3ds = { git = "https://github.com/rust3ds/pthread-3ds.git" } pthread-3ds = { git = "https://github.com/rust3ds/pthread-3ds.git" }

2
ctru-sys/Cargo.toml

@ -1,6 +1,6 @@
[package] [package]
name = "ctru-sys" name = "ctru-sys"
version = "22.0.0+2.2.0" version = "22.2.0+2.2.2-1"
authors = [ "Rust3DS Org", "Ronald Kinard <furyhunter600@gmail.com>" ] authors = [ "Rust3DS Org", "Ronald Kinard <furyhunter600@gmail.com>" ]
license = "Zlib" license = "Zlib"
links = "ctru" links = "ctru"

4
ctru-sys/src/bindings.rs generated

@ -4486,7 +4486,7 @@ impl Default for ConsoleFont {
} }
} }
} }
#[doc = " Console structure used to store the state of a console render context.\n\n Default values from consoleGetDefault();\n PrintConsole defaultConsole =\n \n \t//Font:\n \t\n \t\t(u8*)default_font_bin, //font gfx\n \t\t0, //first ascii character in the set\n \t\t128, //number of characters in the font set\n\t,\n\t0,0, //cursorX cursorY\n\t0,0, //prevcursorX prevcursorY\n\t40, //console width\n\t30, //console height\n\t0, //window x\n\t0, //window y\n\t32, //window width\n\t24, //window height\n\t3, //tab size\n\t0, //font character offset\n\t0, //print callback\n\tfalse //console initialized\n ;\n "] #[doc = " Console structure used to store the state of a console render context.\n\n Default values from consoleGetDefault();\n PrintConsole defaultConsole =\n {\n \t//Font:\n \t{\n \t\t(u8*)default_font_bin, //font gfx\n \t\t0, //first ascii character in the set\n \t\t128, //number of characters in the font set\n\t},\n\t0,0, //cursorX cursorY\n\t0,0, //prevcursorX prevcursorY\n\t40, //console width\n\t30, //console height\n\t0, //window x\n\t0, //window y\n\t32, //window width\n\t24, //window height\n\t3, //tab size\n\t0, //font character offset\n\t0, //print callback\n\tfalse //console initialized\n };\n "]
#[repr(C)] #[repr(C)]
#[derive(Debug, Copy, Clone)] #[derive(Debug, Copy, Clone)]
pub struct PrintConsole { pub struct PrintConsole {
@ -8127,7 +8127,7 @@ extern "C" {
} }
extern "C" { extern "C" {
#[must_use] #[must_use]
#[doc = " Gets an handle to the end of conversion event.\n # Arguments\n\n* `end_event` - Pointer to the event handle to be set to the end of conversion event. It isn't necessary to create or close this handle.\n\n To enable this event you have to use C Y2RU_SetTransferEndInterrupt(true);The event will be triggered when the corresponding interrupt is fired.\n\n > **Note:** It is recommended to use a timeout when waiting on this event, as it sometimes (but rarely) isn't triggered."] #[doc = " Gets an handle to the end of conversion event.\n # Arguments\n\n* `end_event` - Pointer to the event handle to be set to the end of conversion event. It isn't necessary to create or close this handle.\n\n To enable this event you have to use C} Y2RU_SetTransferEndInterrupt(true);The event will be triggered when the corresponding interrupt is fired.\n\n > **Note:** It is recommended to use a timeout when waiting on this event, as it sometimes (but rarely) isn't triggered."]
pub fn Y2RU_GetTransferEndEvent(end_event: *mut Handle) -> Result; pub fn Y2RU_GetTransferEndEvent(end_event: *mut Handle) -> Result;
} }
extern "C" { extern "C" {

9
ctru-sys/src/lib.rs

@ -12,8 +12,11 @@ pub use bindings::*;
pub use result::*; pub use result::*;
/// In lieu of a proper errno function exposed by libc /// In lieu of a proper errno function exposed by libc
/// (<https://github.com/rust-lang/libc/issues/1995>), this will retrieve the /// (<https://github.com/rust-lang/libc/issues/1995>).
/// last error set in the global reentrancy struct.
pub unsafe fn errno() -> s32 { pub unsafe fn errno() -> s32 {
(*__getreent())._errno *__errno()
}
extern "C" {
fn __errno() -> *mut libc::c_int;
} }

Loading…
Cancel
Save