usbloadergx/source/prompts/filebrowser.h
giantpune 30535c6f5d *code beautification*
formatted the code to make it easier to read.  no functional changes at all.

i didn't put anything from the libwiigui folder or banner folder in the beautifier.

my automated .bat seems to have done a good job.  the only places i see it fucked up was on (GXColor){blablabla}.  it treated the brackets in the color like all the other brackets and put the color on a new line and indented it.  i think i fixed most of them.  not sure if it messed up anywhere else.  also not sure about how it handled different linebreaks.  it looks fine on windows.  if it looks messed up on linux, it can be reverted.

the code still compiles and runs fine.
2009-07-30 05:41:12 +00:00

55 lines
1.3 KiB
C

/****************************************************************************
* libwiigui Template
* Tantric 2009
*
* modified by dimok
*
* filebrowser.h
*
* Generic file routines - reading, writing, browsing
****************************************************************************/
#ifndef _FILEBROWSER_H_
#define _FILEBROWSER_H_
#include <unistd.h>
#include <gccore.h>
#define MAXJOLIET 255
#define MAXDISPLAY MAXPATHLEN
enum {
SD,
USB
};
typedef struct {
char dir[MAXPATHLEN]; // directory path of browserList
char rootdir[10]; // directory path of browserList
int numEntries; // # of entries in browserList
int selIndex; // currently selected index of browserList
int pageIndex; // starting index of browserList page display
} BROWSERINFO;
typedef struct {
u64 offset; // DVD offset
u64 length; // file length in 64 bytes for sizes higher than 4GB
char isdir; // 0 - file, 1 - directory
char filename[MAXJOLIET + 1]; // full filename
char displayname[MAXDISPLAY + 1]; // name for browser display
} BROWSERENTRY;
extern BROWSERINFO browser;
extern BROWSERENTRY * browserList;
int UpdateDirName();
int FileSortCallback(const void *f1, const void *f2);
void ResetBrowser();
int ParseDirectory();
int BrowserChangeFolder();
int BrowseDevice(int device);
int BrowseDevice(char * var, int force =-1);
#endif