usbloadergx/source/usbloader/wbfs/wbfs_fat.h
dimok321 e6a87c05fe *Fixed display of partition size on WBFS partitions with a different wbfs sector size than 512bytes.
*Made the ProgressWindow for game installation more accurate
*Added displaying newly installed games (marked as new) on favorite list, so you don't have to change to full list when installing new games. (Thanks Cyan for the patch)
*Lot's a small fixes
*Added WDM Menu on game start. You can set it in the alternative DOL option (one new option there). The menu lists all DOLs on the disc and if a wdm file is provided in the WDM path (configurable in the settings) than the dol parameter and dol replacement name will be taken from the wdm. The DOLs that are not listed in the WDM but exist on the DISC will be listed at the end of the list.
*Added avoid of multiple app cleanup when game fails to boot

*Changed libfat to use FS info sector on FAT32 partitions. This speeds up the free space information getting to instant. For that the FS info sector has to have correct values. The values of all partitions where homebrews were writing to are currently incorrect because the official libfat does not support FS info sector (i submited a patch) (Windows does write it correct though). That is why there needs to be a synchronization of the FS info sector for partitions used with homebrews. For this purpose a new setting was added in the Loader Settings. You can synchronize all your FAT32 partitions on the USB with it once and you are done (if you don't write to that partition with current homebrews). After that you can enable free space display and it will be instant like on WBFS/NTFS/EXT partitions.
2011-01-16 13:12:07 +00:00

69 lines
1.8 KiB
C++

#ifndef _WBFS_FAT_H
#define _WBFS_FAT_H
#include <ogcsys.h>
#include "usbloader/splits.h"
#include "usbloader/wbfs.h"
#include "wbfs_base.h"
class Wbfs_Fat: public Wbfs
{
public:
Wbfs_Fat(u32 device, u32 lba, u32 size);
~Wbfs_Fat();
virtual s32 Open();
virtual void Close();
wbfs_disc_t* OpenDisc(u8 *);
void CloseDisc(wbfs_disc_t *);
s32 GetCount(u32 *);
s32 GetHeaders(struct discHdr *, u32, u32);
s32 AddGame();
s32 RemoveGame(u8 *);
s32 DiskSpace(f32 *, f32 *);
s32 RenameGame(u8 *, const void *);
s32 ReIDGame(u8 *, const void *);
u64 EstimateGameSize();
int GetFragList(u8 *);
virtual bool ShowFreeSpace(void);
protected:
static char wbfs_fs_drive[16];
private:
split_info_t split;
static u32 fat_sector_size;
static char wbfs_fat_dir[16];
static char invalid_path[];
static struct discHdr *fat_hdr_list;
static u32 fat_hdr_count;
wbfs_t* OpenPart(char *fname);
void ClosePart(wbfs_t* part);
wbfs_t* CreatePart(u8 *id, char *path);
int FindFilename(u8 *id, char *fname, int len);
void Filename(u8 *id, char *fname, int len, char *path);
bool CheckLayoutB(char *fname, int len, u8* id, char *fname_title);
s32 GetHeadersCount();
void GetDir(struct discHdr *header, char *path);
void mk_title_txt(struct discHdr *header, char *path);
void mk_gameid_title(struct discHdr *header, char *name, int re_space, int layout);
void title_filename(char *title);
bool is_gameid(char *id);
static int nop_rw_sector(void *_fp, u32 lba, u32 count, void* buf)
{
return 0;
}
};
#endif //_WBFS_FAT_H