Browse Source

Make get_title_list function more readable

pull/95/head
Maccraft123 2 years ago
parent
commit
9eee38bddd
  1. 2
      ctru-rs/src/services/am.rs

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

@ -24,12 +24,14 @@ impl Am { @@ -24,12 +24,14 @@ impl Am {
let count = self.get_title_count(mediatype)?;
let mut buf = Vec::with_capacity(count as usize);
let mut read_amount = 0;
ResultCode(ctru_sys::AM_GetTitleList(
&mut read_amount,
mediatype as u32,
count,
buf.as_mut_ptr(),
))?;
buf.set_len(read_amount as usize);
Ok(buf)
}

Loading…
Cancel
Save