diff --git a/common/file_posix.cpp b/common/file_posix.cpp index 9846b575..91acb88a 100644 --- a/common/file_posix.cpp +++ b/common/file_posix.cpp @@ -9,7 +9,6 @@ #include #ifdef __vita__ -#include #include #include #include @@ -118,12 +117,6 @@ bool Find_File_Data_Posix::FindNextWithFilter() if (DirEntry == nullptr) { return false; } -#ifdef __vita__ - // this makes file search on init slower, but RA fails otherwise because files sneak in here for some reason - if (SCE_S_ISDIR(DirEntry->d_stat.st_mode)) { - continue; - } -#endif if (fnmatch(FileFilter, DirEntry->d_name, FNM_PATHNAME | FNM_CASEFOLD) == 0) { strcpy(FullName, DirName); strcat(FullName, DirEntry->d_name); diff --git a/common/mixfile.h b/common/mixfile.h index f2e4a2da..5d1de2c2 100644 --- a/common/mixfile.h +++ b/common/mixfile.h @@ -36,6 +36,14 @@ #ifdef __vita__ #define PATH_MAX 256 +#define basename basename_vita + +// fails to link due to undefined basename. old newlib? +static char* basename_vita(const char* filename) +{ + char* p = strrchr(filename, '/'); + return p ? p + 1 : (char*)filename; +} #endif #ifndef _MAX_PATH diff --git a/common/paths_vita.cpp b/common/paths_vita.cpp index 7d527ce2..1637c2d9 100644 --- a/common/paths_vita.cpp +++ b/common/paths_vita.cpp @@ -24,7 +24,7 @@ #define PATH_MAX 256 -#include +#include std::string vitaGamePath;