mirror of
https://github.com/wiidev/usbloadergx.git
synced 2024-11-18 17:29:17 +01:00
71adda33e0
*Added HomebrewFiles Class NOTE 1: In settings/custompaths you can change the HomebrewPath and the standard is SD:/apps/. Our browser searches for EVERY .dol and .elf file in the directory even if its not called boot.dol. NOTE 2: Giantpune and me tested the homebrewbooting and it worked for every homebrew we tested except our own application. (a bit ironic) NOTE 3: Right now the information on the Buttons is the path to the Homebrew. This and the BootPrompt will be replaced with the XML information inside the path of the homebrew later but for now i am taking a break NOTE 4: Right now the button to the HomebrewMenu is next to WiiMenuButton and has the same image as the listgamebrowser. I didnt have any images so i took what i had and cyrex will change the images when he is back. Also there will be a no icon image added later.
46 lines
1.4 KiB
C++
46 lines
1.4 KiB
C++
/****************************************************************************
|
|
* HomebrewFiles Class
|
|
* for USB Loader GX
|
|
***************************************************************************/
|
|
#ifndef ___HOMEBREWFILES_H_
|
|
#define ___HOMEBREWFILES_H_
|
|
|
|
#define MAXHOMEBREWS 300
|
|
|
|
typedef struct {
|
|
char FileName[100];
|
|
char FilePath[150];
|
|
unsigned int FileSize;
|
|
} FileInfos;
|
|
|
|
class HomebrewFiles
|
|
{
|
|
public:
|
|
//!Constructor
|
|
//!\param path Path where to check for homebrew files
|
|
HomebrewFiles(const char * path);
|
|
//!Destructor
|
|
~HomebrewFiles();
|
|
//! Load the dol/elf list of a path
|
|
//!\param path Path where to check for homebrew files
|
|
bool LoadPath(const char * path);
|
|
//! Get the a filename of the list
|
|
//!\param list index
|
|
char * GetFilename(int index);
|
|
//! Get the a filepath of the list
|
|
//!\param list index
|
|
char * GetFilepath(int index);
|
|
//! Get the a filesize of the list
|
|
//!\param list index
|
|
unsigned int GetFilesize(int index);
|
|
//! Get the filecount of the whole list
|
|
int GetFilecount();
|
|
//! Sort list by filepath
|
|
void SortList();
|
|
protected:
|
|
int filecount;
|
|
FileInfos FileInfo[MAXHOMEBREWS];
|
|
};
|
|
|
|
#endif
|