*let's get rid of last compile warning

This commit is contained in:
dimok321 2010-09-24 15:08:03 +00:00
parent f8c1692809
commit 5bf2c813b6
2 changed files with 420 additions and 419 deletions

View File

@ -2,8 +2,8 @@
<app version="1"> <app version="1">
<name> USB Loader GX</name> <name> USB Loader GX</name>
<coder>USB Loader GX Team</coder> <coder>USB Loader GX Team</coder>
<version>1.0 r967</version> <version>1.0 r968</version>
<release_date>201009241313</release_date> <release_date>201009241346</release_date>
<short_description>Loads games from USB-devices</short_description> <short_description>Loads games from USB-devices</short_description>
<long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times. <long_description>USB Loader GX is a libwiigui based USB iso loader with a wii-like GUI. You can install games to your HDDs and boot them with shorter loading times.
The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller. The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller.

View File

@ -119,7 +119,8 @@ bool Device_WriteSectors(u32 device, u32 sector, u32 count, void *buffer)
s32 Partition_GetEntriesEx(u32 device, partitionEntry *outbuf, u32 *psect_size, u8 *num) s32 Partition_GetEntriesEx(u32 device, partitionEntry *outbuf, u32 *psect_size, u8 *num)
{ {
static partitionTable table ATTRIBUTE_ALIGN( 32 ); static u8 Buffer[sizeof(partitionTable)] ATTRIBUTE_ALIGN( 32 );
partitionTable *table = (partitionTable *) Buffer;
partitionEntry *entry; partitionEntry *entry;
u32 i, sector_size; u32 i, sector_size;
@ -146,13 +147,13 @@ s32 Partition_GetEntriesEx(u32 device, partitionEntry *outbuf, u32 *psect_size,
u32 next = 0; u32 next = 0;
// Read partition table // Read partition table
ret = Device_ReadSectors(device, 0, 1, &table); ret = Device_ReadSectors(device, 0, 1, table);
if (!ret) return -1; if (!ret) return -1;
// Check if it's a RAW WBFS disc, without partition table // Check if it's a RAW WBFS disc, without partition table
if (get_fs_type(&table) == FS_TYPE_WBFS) if (get_fs_type(table) == FS_TYPE_WBFS)
{ {
memset(outbuf, 0, sizeof(table.entries)); memset(outbuf, 0, sizeof(table->entries));
wbfs_head_t *head = (wbfs_head_t*) &table; wbfs_head_t * head = (wbfs_head_t *) Buffer;
outbuf->size = wbfs_ntohl( head->n_hd_sec ); outbuf->size = wbfs_ntohl( head->n_hd_sec );
*num = 1; *num = 1;
return 0; return 0;
@ -160,7 +161,7 @@ s32 Partition_GetEntriesEx(u32 device, partitionEntry *outbuf, u32 *psect_size,
/* Swap endianess */ /* Swap endianess */
for (i = 0; i < 4; i++) for (i = 0; i < 4; i++)
{ {
entry = &table.entries[i]; entry = &table->entries[i];
entry->sector = swap32(entry->sector); entry->sector = swap32(entry->sector);
entry->size = swap32(entry->size); entry->size = swap32(entry->size);
if (!ext && part_is_extended(entry->type)) if (!ext && part_is_extended(entry->type))
@ -169,7 +170,7 @@ s32 Partition_GetEntriesEx(u32 device, partitionEntry *outbuf, u32 *psect_size,
} }
} }
/* Set partition entries */ /* Set partition entries */
memcpy(outbuf, table.entries, sizeof(table.entries)); memcpy(outbuf, table->entries, sizeof(table->entries));
// num primary // num primary
*num = 4; *num = 4;
@ -179,7 +180,7 @@ s32 Partition_GetEntriesEx(u32 device, partitionEntry *outbuf, u32 *psect_size,
// scan extended partition for logical // scan extended partition for logical
for (i = 0; i < maxpart - 4; i++) for (i = 0; i < maxpart - 4; i++)
{ {
ret = Device_ReadSectors(device, next, 1, &table); ret = Device_ReadSectors(device, next, 1, table);
if (!ret) break; if (!ret) break;
if (i == 0) if (i == 0)
{ {
@ -187,7 +188,7 @@ s32 Partition_GetEntriesEx(u32 device, partitionEntry *outbuf, u32 *psect_size,
// partition instead of on the Logical inside Extended. // partition instead of on the Logical inside Extended.
if (get_fs_type(&table) == FS_TYPE_WBFS) break; if (get_fs_type(&table) == FS_TYPE_WBFS) break;
} }
entry = &table.entries[0]; entry = &table->entries[0];
entry->sector = swap32(entry->sector); entry->sector = swap32(entry->sector);
entry->size = swap32(entry->size); entry->size = swap32(entry->size);
if (entry->type && entry->size && entry->sector) if (entry->type && entry->size && entry->sector)