static void Create_Wii_WBFS_List(wbfs_t *handle) { for(u32 i = 0; i < wbfs_count_discs(handle); i++) { memset((void*)&wii_hdr, 0, sizeof(discHdr)); s32 ret = wbfs_get_disc_info(handle, i, (u8*)&wii_hdr, sizeof(discHdr), NULL); if(ret == 0 && wii_hdr.magic == WII_MAGIC) AddISO((const char*)wii_hdr.id, (const char*)wii_hdr.title, NULL, 0xFFFFFF, TYPE_WII_GAME); } }
s32 WBFS_GetHeaders(void *outbuf, u32 cnt, u32 len) { u32 idx, size; s32 ret; /* No device open */ if (!hdd) return -1; for (idx = 0; idx < cnt; idx++) { u8 *ptr = ((u8 *)outbuf) + (idx * len); /* Get header */ ret = wbfs_get_disc_info(hdd, idx, ptr, len, &size); if (ret < 0) return ret; } return 0; }