PCXT: Fix overlap in OSD menu between ROMs (Fx) and images (Sx) saved in config (#694)

* PCXT: Fix overlap in OSD menu between ROMs (Fx) and images (Sx) saved in config

* PCXT: Menu is not hidden when an image is selected
This commit is contained in:
Aitor Gómez
2022-09-15 19:03:09 +02:00
committed by GitHub
parent a845f8407f
commit 5728bdda78
3 changed files with 40 additions and 2 deletions

View File

@@ -723,6 +723,24 @@ int DirDelete(const char *name)
return !rmdir(full_path);
}
const char* GetNameFromPath(char *path)
{
static char res[32];
char* p = strrchr(path, '/');
if (!p) p = path;
else p++;
if (strlen(p) < 19) strcpy(res, p);
else
{
strncpy(res, p, 19);
res[19] = 0;
}
return res;
}
int FileLoad(const char *name, void *pBuffer, int size)
{
fileTYPE f;