PSP自作ソフト開発ス ..
[2ch|▼Menu]
687:名無しさん@お腹いっぱい。
09/06/13 07:20:20 gIj3HigN
>>686
昔作ったプログラム見てみたけどstaticなくても動いてるよ
/*-------------------------
ディレクトリ内のファイルを取得してリストへ
-------------------------*/
int menuGetFileList(void)
{
int dfd;
SceIoDirent dir;

memset(&dir, 0, sizeof(dir)); // 初期化しないとreadに失敗する
FileCount = 0;
dfd = sceIoDopen(CurDir);
if(dfd >= 0)
{
while (sceIoDread(dfd, &dir) > 0)
{
// 以下のファイルは除外
if (stricmp(dir.d_name, "EBOOT.PBP") == 0 ||
stricmp(dir.d_name, "eeprom.dat") == 0 ||
stricmp(dir.d_name, "SAVE") == 0 ||
stricmp(dir.d_name, "STATE") == 0 ||
stricmp(dir.d_name, ".") == 0)
{
continue;
}
if (dir.d_stat.st_attr & FIO_SO_IFDIR)
{
FileList[FileCount].type = 0;
}
else
{
FileList[FileCount].type = 1;
}
strcpy(FileList[FileCount].name, dir.d_name);
FileCount++;
if (FileCount > 255)
{
break;
}
}
sceIoDclose(dfd);
menuBsortList();
return FileCount;
}
return -1;
}


次ページ
続きを表示
1を表示
最新レス表示
スレッドの検索
類似スレ一覧
話題のニュース
おまかせリスト
▼オプションを表示
暇つぶし2ch

4564日前に更新/245 KB
担当:undef