mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-10-03 12:15:08 +02:00
e8f5ab07bd
* Fixed bug in http.c (where realloc *might* choose another address, thanks Dr. Clipper) * Added support to /wbfs/Game Title [GAMEID].wbfs files (thanks oggzee) * Fixed bug in cfg_cleanup when switching partitions * Added BGM class again (for playing background music, requested by dimok) * Added settings for background music again * Fixed bug in MEM2 class (returning an invalid handle when no memory could be allocated, thanks to dimok) * Updated DIP module to OpenDIP (report bugs with this one if you've found them, but report them here: http://github.com/spacemanspiff/odip-plugin) * Added initial code for cios 222 rev5 (THIS DOES NOT WORK YET! DON'T FILE BUGS ON THIS ONE!) * Added fatffs module by Hermes and Waninkoko (THIS DOES NOT WORK YET! DON'T FILE BUGS ON THIS ONE!) * Fixed bug in Settings, which resulted in a crash when the partition was changed. * Added caching for gamelist entries, so switching between different screens/sort options/display modes should be faster * Changed defines in ehc_module, in order to prevent clashes with new defines in rev5
65 lines
1.8 KiB
C++
65 lines
1.8 KiB
C++
#ifndef _H
|
|
#define _H
|
|
|
|
#include "libwbfs/libwbfs.h"
|
|
#include "usbloader/utils.h"
|
|
#include "usbloader/frag.h"
|
|
|
|
class Wbfs
|
|
{
|
|
public:
|
|
Wbfs(u32, u32, u32);
|
|
|
|
void GetProgressValue(s32 * d, s32 * m);
|
|
static s32 Init(u32);
|
|
void Close();
|
|
s32 CheckGame(u8 *);
|
|
s32 GameSize(u8 *, f32 *);
|
|
wbfs_t *GetHddInfo(void);
|
|
bool Mounted();
|
|
virtual int GetFragList(u8 *id);
|
|
virtual int GetFragList(char *filename, _frag_append_t append_fragment, FragList *);
|
|
virtual bool ShowFreeSpace(void);
|
|
|
|
virtual s32 Open() = 0;
|
|
virtual wbfs_disc_t* OpenDisc(u8 *discid) = 0;
|
|
virtual void CloseDisc(wbfs_disc_t *disc) = 0;
|
|
virtual s32 Format();
|
|
virtual s32 GetCount(u32 *) = 0;
|
|
virtual s32 GetHeaders(struct discHdr *, u32, u32) = 0;
|
|
virtual s32 AddGame(void) = 0;
|
|
virtual s32 RemoveGame(u8 *) = 0;
|
|
virtual s32 DiskSpace(f32 *, f32 *) = 0;
|
|
virtual s32 RenameGame(u8 *, const void *) = 0;
|
|
virtual s32 ReIDGame(u8 *discid, const void *newID) = 0;
|
|
virtual f32 EstimateGameSize(void) = 0;
|
|
|
|
/*
|
|
static s32 OpenPart(u32 part_fat, u32 part_idx, u32 part_lba, u32 part_size, char *partition);
|
|
static s32 OpenNamed(char *partition);
|
|
static s32 OpenLBA(u32 lba, u32 size);
|
|
*/
|
|
protected:
|
|
static rw_sector_callback_t readCallback;
|
|
static rw_sector_callback_t writeCallback;
|
|
static s32 __ReadDVD(void *fp, u32 lba, u32 len, void *iobuf);
|
|
static void Spinner(s32 x, s32 max);
|
|
|
|
static u32 nb_sectors;
|
|
static u32 sector_size;
|
|
|
|
/* WBFS HDD */
|
|
wbfs_t *hdd;
|
|
|
|
u32 device, lba, size;
|
|
private:
|
|
static s32 __ReadUSB(void *fp, u32 lba, u32 count, void *iobuf);
|
|
static s32 __WriteUSB(void *fp, u32 lba, u32 count, void *iobuf);
|
|
static s32 __ReadSDHC(void *fp, u32 lba, u32 count, void *iobuf);
|
|
static s32 __WriteSDHC(void *fp, u32 lba, u32 count, void *iobuf);
|
|
|
|
static s32 total, done;
|
|
};
|
|
|
|
#endif //_H
|