*Fixed InstallProgress to show size and speed again

*Added intern GameTitle rename for .wbfs files on FAT32
*Added intern GameID change for .wbfs files on FAT32
This commit is contained in:
dimok321 2009-11-22 14:09:08 +00:00
parent b4b5b5389c
commit b70af2d71d
7 changed files with 229 additions and 171 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 r840</version> <version>1.0 r841</version>
<release_date>200911212330</release_date> <release_date>200911221220</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.

File diff suppressed because one or more lines are too long

View File

@ -39,7 +39,6 @@ GuiSound * bgMusic = NULL;
GuiSound *btnClick2 = NULL; GuiSound *btnClick2 = NULL;
struct discHdr *dvdheader = NULL; struct discHdr *dvdheader = NULL;
float gamesize;
int currentMenu; int currentMenu;
u8 mountMethod=0; u8 mountMethod=0;

View File

@ -6,6 +6,8 @@
#include "usbloader/getentries.h" #include "usbloader/getentries.h"
#include "prompts/ProgressWindow.h" #include "prompts/ProgressWindow.h"
float gamesize;
/**************************************************************************** /****************************************************************************
* MenuInstall * MenuInstall
***************************************************************************/ ***************************************************************************/
@ -82,7 +84,7 @@ int MenuInstall() {
f32 freespace, used; f32 freespace, used;
WBFS_DiskSpace(&used, &freespace); WBFS_DiskSpace(&used, &freespace);
float gamesize = WBFS_EstimeGameSize()/GB_SIZE; gamesize = WBFS_EstimeGameSize()/GB_SIZE;
char gametxt[50]; char gametxt[50];

View File

@ -551,8 +551,12 @@ s32 WBFS_DiskSpace(f32 *used, f32 *free) {
return 0; return 0;
} }
s32 WBFS_RenameGame(u8 *discid, const void *newname) { s32 WBFS_RenameGame(u8 *discid, const void *newname)
if (wbfs_part_fat) return -1; {
if (wbfs_part_fat)
{
return WBFS_FAT_RenameGame(discid, newname);
}
s32 ret; s32 ret;
@ -566,8 +570,12 @@ s32 WBFS_RenameGame(u8 *discid, const void *newname) {
return 0; return 0;
} }
s32 WBFS_ReIDGame(u8 *discid, const void *newID) { s32 WBFS_ReIDGame(u8 *discid, const void *newID)
if (wbfs_part_fat) return -1; {
if (wbfs_part_fat)
{
return WBFS_FAT_ReIDGame(discid, newID);
}
s32 ret; s32 ret;

View File

@ -217,7 +217,7 @@ wbfs_t* WBFS_FAT_OpenPart(u8 *id)
if (ret) return NULL; if (ret) return NULL;
part = wbfs_open_partition( part = wbfs_open_partition(
split_read_sector, split_read_sector,
nop_write_sector, //readonly //split_write_sector, split_write_sector, //readonly //split_write_sector,
&split, fat_sector_size, split.total_sec, 0, 0); &split, fat_sector_size, split.total_sec, 0, 0);
if (!part) { if (!part) {
split_close(&split); split_close(&split);
@ -337,3 +337,50 @@ s32 WBFS_FAT_DVD_Size(u64 *comp_size, u64 *real_size)
return 0; return 0;
} }
s32 WBFS_FAT_RenameGame(u8 *discid, const void *newname)
{
wbfs_t *part = WBFS_FAT_OpenPart(discid);
if (!part)
return -1;
s32 ret = wbfs_ren_disc(part, discid,(u8*)newname);
WBFS_FAT_ClosePart(part);
return ret;
}
s32 WBFS_FAT_ReIDGame(u8 *discid, const void *newID)
{
wbfs_t *part = WBFS_FAT_OpenPart(discid);
if (!part)
return -1;
s32 ret = wbfs_rID_disc(part, discid,(u8*)newID);
WBFS_FAT_ClosePart(part);
if(ret == 0)
{
char fname[100];
char fnamenew[100];
s32 cnt = 0x31;
WBFS_FAT_fname(discid, fname, sizeof(fname));
WBFS_FAT_fname((u8*) newID, fnamenew, sizeof(fnamenew));
int stringlength = strlen(fname);
while(rename(fname, fnamenew) == 0)
{
fname[stringlength] = cnt;
fname[stringlength+1] = 0;
fnamenew[stringlength] = cnt;
fnamenew[stringlength+1] = 0;
cnt++;
}
}
return ret;
}

View File

@ -11,5 +11,7 @@ s32 WBFS_FAT_DiskSpace(f32 *used, f32 *free);
s32 WBFS_FAT_RemoveGame(u8 *discid); s32 WBFS_FAT_RemoveGame(u8 *discid);
s32 WBFS_FAT_AddGame(void); s32 WBFS_FAT_AddGame(void);
s32 WBFS_FAT_DVD_Size(u64 *comp_size, u64 *real_size); s32 WBFS_FAT_DVD_Size(u64 *comp_size, u64 *real_size);
s32 WBFS_FAT_RenameGame(u8 *discid, const void *newname);
s32 WBFS_FAT_ReIDGame(u8 *discid, const void *newID);
#endif #endif