Skip to content

Commit

Permalink
Revert some changes for now to fix the build with the older vitasdk (…
Browse files Browse the repository at this point in the history
…since the new one has some IO performance regression)
  • Loading branch information
Northfear committed Dec 23, 2023
1 parent 379721e commit 9a63b69
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 8 deletions.
7 changes: 0 additions & 7 deletions common/file_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
#include <fnmatch.h>

#ifdef __vita__
#include <psp2/io/stat.h>
#include <algorithm>
#include <string>
#include <vector>
Expand Down Expand Up @@ -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);
Expand Down
8 changes: 8 additions & 0 deletions common/mixfile.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion common/paths_vita.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

#define PATH_MAX 256

#include <psp2/io/stat.h>
#include <psp2/io/dirent.h>

std::string vitaGamePath;

Expand Down

0 comments on commit 9a63b69

Please sign in to comment.