* Added Free space on NTFS drives

* Applied patch from mlgd, which prevented the right partition to be selected after exiting the settings page.
This commit is contained in:
e.bovendeur 2010-01-31 23:55:59 +00:00
parent 57ecea56e9
commit 1c6c607cf1
5 changed files with 15 additions and 11 deletions

View File

@ -2,8 +2,8 @@
<app version="1">
<name> USB Loader GX</name>
<coder>USB Loader GX Team</coder>
<version>1.0 r900</version>
<release_date>201001311842</release_date>
<version>1.0 r901</version>
<release_date>201001312334</release_date>
<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.
The interactive GUI is completely controllable with WiiMote, Classic Controller or GC Controller.

View File

@ -328,6 +328,12 @@ int ntfs_statvfs_r (struct _reent *r, const char *path, struct statvfs *buf)
// Zero out the stat buffer
memset(buf, 0, sizeof(struct statvfs));
if(ntfs_volume_get_free_space(vd->vol) < 0)
{
ntfsUnlock(vd);
return -1;
}
// File system block size
buf->f_bsize = vd->vol->cluster_size;

View File

@ -89,7 +89,7 @@ int MenuDiscList() {
char theTime[80]="";
time_t lastrawtime=0;
if (mountMethod != 3 && load_from_fs == PART_FS_WBFS) {
if (mountMethod != 3 && load_from_fs != PART_FS_FAT) {
WBFS_DiskSpace(&used, &freespace);
}
@ -196,7 +196,7 @@ int MenuDiscList() {
screenShotBtn.SetTrigger(&trigZ);
char spaceinfo[30];
if (load_from_fs != PART_FS_WBFS) {
if (load_from_fs == PART_FS_FAT) {
memset(spaceinfo, 0, 30);
} else {
if (!strcmp(Settings.db_language,"JA")) {

View File

@ -97,7 +97,6 @@ int MenuInstall() {
sprintf(gametxt, "%s", tr("Installing game:"));
/*
if (gamesize > freespace) {
char errortxt[50];
sprintf(errortxt, "%s: %.2fGB, %s: %.2fGB",tr("Game Size"), gamesize, tr("Free Space"), freespace);
@ -105,7 +104,6 @@ int MenuInstall() {
menu = MENU_DISCLIST;
break;
} else {
*/
USBStorage_Watchdog(0);
SetupGameInstallProgress(gametxt, name);
ret = WBFS_AddGame();
@ -131,7 +129,7 @@ int MenuInstall() {
menu = MENU_DISCLIST;
break;
}
// }
}
} else {
menu = MENU_DISCLIST;
break;

View File

@ -2147,12 +2147,12 @@ int MenuSettings()
while (w.GetEffect()>0) usleep(50);
// if partition has changed, Reinitialize it
PartInfo pinfo = partitions.pinfo[Settings.partition];
partitionEntry pentry = partitions.pentry[Settings.partition];
load_from_fs = pinfo.part_fs;
if (Settings.partition != settingspartitionold) {
WBFS_Close();
WBFS_OpenPart(load_from_fs, pinfo.index, pentry.sector, pentry.size, (char *) &game_partition);
PartInfo pinfo = partitions.pinfo[Settings.partition];
partitionEntry pentry = partitions.pentry[Settings.partition];
WBFS_OpenPart(load_from_fs, pinfo.index, pentry.sector, pentry.size, (char *) &game_partition);
load_from_fs = pinfo.part_fs;
}
// if language has changed, reload titles