mirror of
https://github.com/id-Software/Wolf3D-iOS.git
synced 2026-03-20 08:59:51 +01:00
Source release of Wolfenstein 3D Classic Platinum for iOS, 2.1
This commit is contained in:
8
wolf3d/code/env/fileio.c
vendored
8
wolf3d/code/env/fileio.c
vendored
@@ -109,12 +109,17 @@ PUBLIC W32 FS_FileSeek( filehandle_t *fhandle, SW32 offset, W32 origin )
|
||||
return 1;
|
||||
}
|
||||
|
||||
/* Commenting this out to avoid a warning - note that this is probably not what was
|
||||
intended!
|
||||
|
||||
// offset is negative
|
||||
if( (fhandle->filesize + offset) < 0 )
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
// offset is negative
|
||||
fhandle->ptrCurrent = fhandle->ptrEnd + offset;
|
||||
break;
|
||||
@@ -223,7 +228,6 @@ PUBLIC filehandle_t *FS_OpenFile( const char *filename, W32 FlagsAndAttributes )
|
||||
// high performance file mapping path, avoiding stdio
|
||||
fd = open( netpath, O_RDONLY );
|
||||
if ( fd == -1 ) {
|
||||
// return NULL;
|
||||
//if it couldn't be found in that path then check again in the document directory
|
||||
//gsh
|
||||
//pathBase = FS_ForceGamedir();
|
||||
@@ -231,7 +235,7 @@ PUBLIC filehandle_t *FS_OpenFile( const char *filename, W32 FlagsAndAttributes )
|
||||
pathBase = iphoneDocDirectory;
|
||||
my_snprintf( netpath, sizeof( netpath ), "%s/%s", pathBase, filename );
|
||||
fd = open( netpath, O_RDONLY );
|
||||
if ( fd == -1 ) { //okay, couldn't find it there either... return null
|
||||
if ( fd == -1 ) {
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user