platform: psp PATH_MAX fix

This commit is contained in:
Crow-bar
2022-11-02 16:38:33 +03:00
parent 0dc1c13b83
commit 28723b01a9
3 changed files with 10 additions and 8 deletions

View File

@@ -80,15 +80,17 @@ GNU General Public License for more details.
#if XASH_PSP
#include <unistd.h>
#include <pspiofilemgr.h>
#define PATH_MAX 1024
#define PATH_MAX 256 //PSP FATMS Maximum length of a full pathname 260 characters
#define PATH_SPLITTER "/"
#define O_BINARY 0
#define O_TEXT 0
#define _mkdir( x ) sceIoMkdir( x, FIO_S_IRWXU | FIO_S_IRWXG | FIO_S_IROTH | FIO_S_IXOTH )
#define SetCurrentDirectory( x ) ( !sceIoChdir( x ) )
#define LoadLibrary( x ) ( 0 )
#define GetProcAddress( x, y ) ( 0 )
#define FreeLibrary( x ) ( 0 )
#define _mkdir( x ) sceIoMkdir( x, FIO_S_IRWXU | FIO_S_IRWXG | FIO_S_IROTH | FIO_S_IXOTH )
#define SetCurrentDirectory( x ) ( !sceIoChdir( x ) )
#define LoadLibrary( x ) ( 0 )
#define GetProcAddress( x, y ) ( 0 )
#define FreeLibrary( x ) ( 0 )
#endif
//#define MAKEWORD( a, b ) ((short int)(((unsigned char)(a))|(((short int)((unsigned char)(b)))<<8)))

View File

@@ -31,7 +31,7 @@ typedef struct fsh_handle_s
{
qboolean ready;
int count;
char folderpath[FSH_MAX_PATH];
char folderpath[PATH_MAX];
int folderpath_size;
uint empty_hash;
int pathlist_size;

View File

@@ -141,7 +141,7 @@ mod_handle_t *Module_Load( const char *name )
SceUID modUid;
uint modSegAddr, modSegSize;
SceKernelModuleInfo info;
char engine_cwd[256];
char engine_cwd[PATH_MAX];
if( !name )
return NULL;