mirror of
https://github.com/id-Software/Wolf3D-iOS.git
synced 2026-03-20 00:49:35 +01:00
Source release of Wolfenstein 3D Classic Platinum for iOS, 1.2
This commit is contained in:
14
wolf3d/code/env/fileio.c
vendored
14
wolf3d/code/env/fileio.c
vendored
@@ -216,8 +216,6 @@ PUBLIC filehandle_t *FS_OpenFile( const char *filename, W32 FlagsAndAttributes )
|
||||
pathBase = iphoneDocDirectory;
|
||||
my_snprintf( netpath, sizeof( netpath ), "%s/%s", pathBase, filename );
|
||||
} else {
|
||||
// extern char iphoneAppDirectory[1024];
|
||||
// pathBase = iphoneAppDirectory;
|
||||
pathBase = FS_Gamedir();
|
||||
my_snprintf( netpath, sizeof( netpath ), "%s/%s", pathBase, filename );
|
||||
}
|
||||
@@ -225,7 +223,17 @@ 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;
|
||||
// return NULL;
|
||||
//if it couldn't be found in that path then check again in the document directory
|
||||
//gsh
|
||||
//pathBase = FS_ForceGamedir();
|
||||
extern char iphoneDocDirectory[1024];
|
||||
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
|
||||
return NULL;
|
||||
}
|
||||
}
|
||||
fstat( fd, &s );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user