mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-26 05:04:16 +01:00
*re-eveluate partition size after installing games and such (from r-win)
This commit is contained in:
parent
1c6c607cf1
commit
aeb7aff9ea
@ -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 r901</version>
|
<version>1.0 r902</version>
|
||||||
<release_date>201001312334</release_date>
|
<release_date>201002011014</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.
|
||||||
|
@ -34,11 +34,6 @@ char wbfs_fs_drive[16];
|
|||||||
char wbfs_fat_dir[16] = "/wbfs";
|
char wbfs_fat_dir[16] = "/wbfs";
|
||||||
char invalid_path[] = "/\\:|<>?*\"'";
|
char invalid_path[] = "/\\:|<>?*\"'";
|
||||||
|
|
||||||
int wbfs_fat_vfs_have = 0;
|
|
||||||
int wbfs_fat_vfs_lba = 0;
|
|
||||||
int wbfs_fat_vfs_dev = 0;
|
|
||||||
struct statvfs wbfs_fat_vfs;
|
|
||||||
|
|
||||||
split_info_t split;
|
split_info_t split;
|
||||||
|
|
||||||
static u32 fat_sector_size = 512;
|
static u32 fat_sector_size = 512;
|
||||||
@ -317,27 +312,18 @@ s32 WBFS_FAT_DiskSpace(f32 *used, f32 *free)
|
|||||||
{
|
{
|
||||||
f32 size;
|
f32 size;
|
||||||
int ret;
|
int ret;
|
||||||
|
struct statvfs wbfs_fat_vfs;
|
||||||
|
|
||||||
*used = 0;
|
*used = 0;
|
||||||
*free = 0;
|
*free = 0;
|
||||||
// statvfs is slow, so cache values
|
|
||||||
if (!wbfs_fat_vfs_have
|
|
||||||
|| wbfs_fat_vfs_lba != wbfs_part_lba
|
|
||||||
|| wbfs_fat_vfs_dev != wbfsDev )
|
|
||||||
{
|
|
||||||
ret = statvfs(wbfs_fs_drive, &wbfs_fat_vfs);
|
ret = statvfs(wbfs_fs_drive, &wbfs_fat_vfs);
|
||||||
if (ret) return 0;
|
if (ret) return -1;
|
||||||
wbfs_fat_vfs_have = 1;
|
|
||||||
wbfs_fat_vfs_lba = wbfs_part_lba;
|
|
||||||
wbfs_fat_vfs_dev = wbfsDev;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FS size in GB */
|
/* FS size in GB */
|
||||||
size = (f32)wbfs_fat_vfs.f_frsize * (f32)wbfs_fat_vfs.f_blocks / GB_SIZE;
|
size = (f32)wbfs_fat_vfs.f_frsize * (f32)wbfs_fat_vfs.f_blocks / GB_SIZE;
|
||||||
*free = (f32)wbfs_fat_vfs.f_frsize * (f32)wbfs_fat_vfs.f_bfree / GB_SIZE;
|
*free = (f32)wbfs_fat_vfs.f_frsize * (f32)wbfs_fat_vfs.f_bfree / GB_SIZE;
|
||||||
*used = size - *free;
|
*used = size - *free;
|
||||||
|
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user