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