mirror of
https://gitlab.com/Nanolx/homebrewfilter.git
synced 2024-11-24 10:09:21 +01:00
removed some unused code
This commit is contained in:
parent
56192d0a98
commit
7742abfcf1
Binary file not shown.
@ -23,79 +23,9 @@ extern void HaltGui();
|
||||
|
||||
void add(string device, string apps_path)
|
||||
{
|
||||
/*
|
||||
char dirname[MAXPATHLEN];
|
||||
struct stat st;
|
||||
DIR_ITER* dir;
|
||||
char pathnameelf[200];
|
||||
char pathname[200];
|
||||
char pFilename[200];
|
||||
string pathboot;
|
||||
dir = diropen ((device + ":/" + apps_path).c_str());
|
||||
|
||||
if(dir != NULL)
|
||||
{
|
||||
//get all dir names
|
||||
while( dirnext (dir, dirname, &st) != -1 )
|
||||
{
|
||||
sprintf(pathnameelf, (device + ":/" + apps_path + "%s/boot.elf").c_str() ,dirname);
|
||||
sprintf(pathname, (device + ":/" + apps_path + "%s/boot.dol").c_str() ,dirname);
|
||||
|
||||
if(fopen(pathnameelf, "rb") != NULL) pathboot = pathnameelf;
|
||||
if(fopen(pathname, "rb") != NULL) pathboot = pathname;
|
||||
|
||||
if((fopen(pathname, "rb") || fopen(pathnameelf, "rb")) && strstr(pathname, (apps_path + "./").c_str()) == 0 && strstr(pathname, (apps_path + "../").c_str()) == 0 )
|
||||
{
|
||||
sprintf(pFilename, (device + ":/" + apps_path + "%s/meta.xml").c_str() ,dirname);
|
||||
|
||||
string line, quelltext, name, info, foldername, iconpath, arg;
|
||||
ifstream in(pFilename);
|
||||
while(getline(in, line))
|
||||
quelltext = quelltext + line + "\n";
|
||||
|
||||
name = parser(quelltext, "<name>", "</name>");
|
||||
if(name == "\0") name = dirname;
|
||||
|
||||
info = parser(quelltext, "<short_description>", "</short_description>");
|
||||
if(info == "\0") info = tr("<no description>");
|
||||
|
||||
foldername = device + ":/" + apps_path + dirname + "/";
|
||||
transform(foldername.begin(), foldername.end(), foldername.begin(),::tolower); // in kleinebuchstaben umwandeln
|
||||
|
||||
u8 *tempicon;
|
||||
u8 *icon = NULL;
|
||||
|
||||
iconpath = foldername + "icon.png";
|
||||
|
||||
arg = parser(quelltext, "<arguments>", "</arguments>");
|
||||
|
||||
size_t amount_read;
|
||||
FILE *fp = fopen(iconpath.c_str(),"r"); //open the png file
|
||||
if(fp) //make sure the file exists
|
||||
{
|
||||
u32 filesize;
|
||||
fseek (fp , 0 , SEEK_END);
|
||||
filesize = ftell(fp); //find the file size
|
||||
rewind(fp);
|
||||
|
||||
tempicon = new u8 [filesize]; //allocate memory for your image buffer
|
||||
if(tempicon) //make sure memory allocated
|
||||
{
|
||||
amount_read = fread(tempicon,1,filesize,fp); //read file to buffer
|
||||
if(amount_read == filesize) icon = tempicon; //make sure it read everything
|
||||
}
|
||||
}
|
||||
fclose(fp); //close file
|
||||
|
||||
vechomebrew_list_category[0].push_back(homebrew_list(name, info, foldername, icon, pathboot, arg));
|
||||
}
|
||||
}
|
||||
dirclose( dir );
|
||||
}*/
|
||||
|
||||
DIR *pdir;
|
||||
struct dirent *pent;
|
||||
// struct stat statbuf;
|
||||
|
||||
char pathnameelf[200];
|
||||
char pathname[200];
|
||||
|
Loading…
Reference in New Issue
Block a user