Browse Source

Refresh libctru to the latest version

pull/90/head
Andrea Ciliberti 2 years ago
parent
commit
7a67600327
  1. 2
      ctru-rs/src/linear.rs
  2. 2
      ctru-rs/src/services/ps.rs
  3. 6
      ctru-sys/bindgen.sh
  4. 9755
      ctru-sys/src/bindings.rs

2
ctru-rs/src/linear.rs

@ -30,7 +30,7 @@ impl LinearAllocator { @@ -30,7 +30,7 @@ impl LinearAllocator {
unsafe impl Allocator for LinearAllocator {
fn allocate(&self, layout: Layout) -> Result<NonNull<[u8]>, AllocError> {
let pointer =
unsafe { ctru_sys::linearMemAlign(layout.size() as u32, layout.align() as u32) };
unsafe { ctru_sys::linearMemAlign(layout.size(), layout.align()) };
NonNull::new(pointer.cast())
.map(|ptr| NonNull::slice_from_raw_parts(ptr, layout.size()))

2
ctru-rs/src/services/ps.rs

@ -46,7 +46,7 @@ pub fn device_id() -> crate::Result<u32> { @@ -46,7 +46,7 @@ pub fn device_id() -> crate::Result<u32> {
pub fn generate_random_bytes(out: &mut [u8]) -> crate::Result<()> {
ResultCode(unsafe {
ctru_sys::PS_GenerateRandomBytes(out as *mut _ as *mut _, out.len() as u32)
ctru_sys::PS_GenerateRandomBytes(out as *mut _ as *mut _, out.len())
})?;
Ok(())
}

6
ctru-sys/bindgen.sh

@ -11,9 +11,9 @@ bindgen "$DEVKITPRO/libctru/include/3ds.h" \ @@ -11,9 +11,9 @@ bindgen "$DEVKITPRO/libctru/include/3ds.h" \
--ctypes-prefix "::libc" \
--no-prepend-enum-name \
--generate "functions,types,vars" \
--blacklist-type "u(8|16|32|64)" \
--blacklist-type "__builtin_va_list" \
--blacklist-type "__va_list" \
--blocklist-type "u(8|16|32|64)" \
--blocklist-type "__builtin_va_list" \
--blocklist-type "__va_list" \
--opaque-type "MiiData" \
--with-derive-default \
-- \

9755
ctru-sys/src/bindings.rs

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save