arm64 : fix intptr_t size

This commit is contained in:
hymei
2022-06-05 01:12:32 +03:00
committed by nillerusr
parent 2690e6c85a
commit 4e4039d756
143 changed files with 1015 additions and 674 deletions
+7 -7
View File
@@ -24,29 +24,29 @@
class StdIOReadBinary : public IFileReadBinary
{
public:
int open( const char *pFileName )
intp open( const char *pFileName )
{
return (int)fopen( pFileName, "rb" );
return (intp)fopen( pFileName, "rb" );
}
int read( void *pOutput, int size, int file )
int read( void *pOutput, int size, intp file )
{
FILE *fp = (FILE *)file;
return fread( pOutput, size, 1, fp );
}
void seek( int file, int pos )
void seek( intp file, int pos )
{
fseek( (FILE *)file, pos, SEEK_SET );
}
unsigned int tell( int file )
unsigned int tell( intp file )
{
return ftell( (FILE *)file );
}
unsigned int size( int file )
unsigned int size( intp file )
{
FILE *fp = (FILE *)file;
if ( !fp )
@@ -60,7 +60,7 @@ public:
return size;
}
void close( int file )
void close( intp file )
{
FILE *fp = (FILE *)file;
+14 -14
View File
@@ -29,12 +29,12 @@ class CFSIOReadBinary : public IFileReadBinary
{
public:
// inherited from IFileReadBinary
virtual int open( const char *pFileName );
virtual int read( void *pOutput, int size, int file );
virtual void seek( int file, int pos );
virtual unsigned int tell( int file );
virtual unsigned int size( int file );
virtual void close( int file );
virtual intp open( const char *pFileName );
virtual int read( void *pOutput, int size, intp file );
virtual void seek( intp file, int pos );
virtual unsigned int tell( intp file );
virtual unsigned int size( intp file );
virtual void close( intp file );
};
class CFSIOWriteBinary : public IFileWriteBinary
@@ -61,12 +61,12 @@ IFileWriteBinary *g_pFSIOWriteBinary = &s_FSIoOut;
//-----------------------------------------------------------------------------
// RIFF reader that use the file system
//-----------------------------------------------------------------------------
int CFSIOReadBinary::open( const char *pFileName )
intp CFSIOReadBinary::open( const char *pFileName )
{
return (int)g_pFullFileSystem->Open( pFileName, "rb" );
return (intp)g_pFullFileSystem->Open( pFileName, "rb" );
}
int CFSIOReadBinary::read( void *pOutput, int size, int file )
int CFSIOReadBinary::read( void *pOutput, int size, intp file )
{
if ( !file )
return 0;
@@ -74,7 +74,7 @@ int CFSIOReadBinary::read( void *pOutput, int size, int file )
return g_pFullFileSystem->Read( pOutput, size, (FileHandle_t)file );
}
void CFSIOReadBinary::seek( int file, int pos )
void CFSIOReadBinary::seek( intp file, int pos )
{
if ( !file )
return;
@@ -82,7 +82,7 @@ void CFSIOReadBinary::seek( int file, int pos )
g_pFullFileSystem->Seek( (FileHandle_t)file, pos, FILESYSTEM_SEEK_HEAD );
}
unsigned int CFSIOReadBinary::tell( int file )
unsigned int CFSIOReadBinary::tell( intp file )
{
if ( !file )
return 0;
@@ -90,7 +90,7 @@ unsigned int CFSIOReadBinary::tell( int file )
return g_pFullFileSystem->Tell( (FileHandle_t)file );
}
unsigned int CFSIOReadBinary::size( int file )
unsigned int CFSIOReadBinary::size( intp file )
{
if ( !file )
return 0;
@@ -98,7 +98,7 @@ unsigned int CFSIOReadBinary::size( int file )
return g_pFullFileSystem->Size( (FileHandle_t)file );
}
void CFSIOReadBinary::close( int file )
void CFSIOReadBinary::close( intp file )
{
if ( !file )
return;
@@ -113,7 +113,7 @@ void CFSIOReadBinary::close( int file )
int CFSIOWriteBinary::create( const char *pFileName )
{
g_pFullFileSystem->SetFileWritable( pFileName, true );
return (int)g_pFullFileSystem->Open( pFileName, "wb" );
return (intp)g_pFullFileSystem->Open( pFileName, "wb" );
}
int CFSIOWriteBinary::write( void *pData, int size, int file )