mirror of
https://github.com/rvtr/TDT.git
synced 2025-10-31 13:51:07 -04:00
Delete titles.c
This commit is contained in:
parent
52215ca8f7
commit
0e4cdbf43e
37
src/titles.c
37
src/titles.c
@ -1,37 +0,0 @@
|
|||||||
#include "titles.h"
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <dirent.h>
|
|
||||||
|
|
||||||
bool titleIsUsed(u32 tidlow, u32 tidhigh)
|
|
||||||
{
|
|
||||||
bool result = false;
|
|
||||||
|
|
||||||
char path[256];
|
|
||||||
sprintf(path, "/title/%08x/%08x/", (unsigned int)tidhigh, (unsigned int)tidlow);
|
|
||||||
|
|
||||||
DIR* dir = opendir(path);
|
|
||||||
struct dirent* ent;
|
|
||||||
|
|
||||||
if (dir)
|
|
||||||
{
|
|
||||||
while ( (ent = readdir(dir)) != NULL )
|
|
||||||
{
|
|
||||||
if (strcmp(".", ent->d_name) == 0 || strcmp("..", ent->d_name) == 0)
|
|
||||||
continue;
|
|
||||||
|
|
||||||
if (ent->d_type != DT_DIR)
|
|
||||||
{
|
|
||||||
if (strstr(ent->d_name, ".app") != NULL)
|
|
||||||
{
|
|
||||||
result = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
closedir(dir);
|
|
||||||
|
|
||||||
return result;
|
|
||||||
}
|
|
||||||
Loading…
Reference in New Issue
Block a user