Skip to content

Commit

Permalink
Made Vita data path const and added a comment
Browse files Browse the repository at this point in the history
  • Loading branch information
Northfear committed Dec 20, 2023
1 parent bc7b60d commit 11d006d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions common/file_posix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ bool Find_File_Data_Posix::FindNextWithFilter()
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;
}
Expand Down
3 changes: 2 additions & 1 deletion redalert/startup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@ HINSTANCE ProgramInstance;
#include <psp2/power.h>

int _newlib_heap_size_user = 256 * 1024 * 1024;
const char VitaDataPath[] = "ux0:data/VanillaRA";
#endif

extern bool RA95AlreadyRunning;
Expand Down Expand Up @@ -305,7 +306,7 @@ int main(int argc, char* argv[])
** Remember the current working directory and drive.
*/
#ifdef __vita__
Paths.Init("vanillara", CONFIG_FILE_NAME, "REDALERT.MIX", "ux0:data/VanillaRA");
Paths.Init("vanillara", CONFIG_FILE_NAME, "REDALERT.MIX", VitaDataPath);
#else
Paths.Init("vanillara", CONFIG_FILE_NAME, "REDALERT.MIX", args.ArgV[0]);
#endif
Expand Down
3 changes: 2 additions & 1 deletion tiberiandawn/startup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ HINSTANCE ProgramInstance;
#include <psp2/power.h>

int _newlib_heap_size_user = 256 * 1024 * 1024;
const char VitaDataPath[] = "ux0:data/VanillaTD";
#endif

extern int ReadyToQuit;
Expand Down Expand Up @@ -261,7 +262,7 @@ int main(int argc, char** argv)
** Remember the current working directory and drive.
*/
#ifdef __vita__
Paths.Init("vanillatd", "CONQUER.INI", "CONQUER.MIX", "ux0:data/VanillaTD");
Paths.Init("vanillatd", "CONQUER.INI", "CONQUER.MIX", VitaDataPath);
#else
Paths.Init("vanillatd", "CONQUER.INI", "CONQUER.MIX", args.ArgV[0]);
#endif
Expand Down

0 comments on commit 11d006d

Please sign in to comment.