Remove FS_Read2().
Functionally the same as FS_Read(). Streaming functionality was removed in https://github.com/ioquake/ioq3/commit/672cfbf16f83fb67f6ce9bb1d3571dc32a5b3083 but flag remained.
This commit is contained in:
1 parent
b173ac0599
commit
d4e1a01f33
7 files changed
+5
-39
No files matched your search
@@ -280,7 +280,6 @@ typedef struct {
|
||||
int zipFilePos;
|
||||
int zipFileLen;
|
||||
qboolean zipFile;
|
||||
qboolean streamed;
|
||||
char name[MAX_ZPATH];
|
||||
} fileHandleData_t;
|
||||
|
||||
@@ -1510,25 +1509,6 @@ FS_Read
|
||||
Properly handles partial reads
|
||||
=================
|
||||
*/
|
||||
int FS_Read2( void *buffer, int len, fileHandle_t f ) {
|
||||
if ( !fs_searchpaths ) {
|
||||
Com_Error( ERR_FATAL, "Filesystem call made without initialization" );
|
||||
}
|
||||
|
||||
if ( !f ) {
|
||||
return 0;
|
||||
}
|
||||
if (fsh[f].streamed) {
|
||||
int r;
|
||||
fsh[f].streamed = qfalse;
|
||||
r = FS_Read( buffer, len, f );
|
||||
fsh[f].streamed = qtrue;
|
||||
return r;
|
||||
} else {
|
||||
return FS_Read( buffer, len, f);
|
||||
}
|
||||
}
|
||||
|
||||
int FS_Read( void *buffer, int len, fileHandle_t f ) {
|
||||
int block, remaining;
|
||||
int read;
|
||||
@@ -1655,14 +1635,6 @@ int FS_Seek( fileHandle_t f, long offset, int origin ) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (fsh[f].streamed) {
|
||||
int r;
|
||||
fsh[f].streamed = qfalse;
|
||||
r = FS_Seek( f, offset, origin );
|
||||
fsh[f].streamed = qtrue;
|
||||
return r;
|
||||
}
|
||||
|
||||
if (fsh[f].zipFile == qtrue) {
|
||||
//FIXME: this is really, really crappy
|
||||
//(but better than what was here before)
|
||||
@@ -4119,11 +4091,6 @@ int FS_FOpenFileByMode( const char *qpath, fileHandle_t *f, fsMode_t mode ) {
|
||||
|
||||
if ( *f ) {
|
||||
fsh[*f].fileSize = r;
|
||||
fsh[*f].streamed = qfalse;
|
||||
|
||||
if (mode == FS_READ) {
|
||||
fsh[*f].streamed = qtrue;
|
||||
}
|
||||
}
|
||||
fsh[*f].handleSync = sync;
|
||||
|
||||
|
||||
+1
-1
@@ -290,7 +290,7 @@ char *Com_MD5File( const char *fn, int length, const char *prefix, int prefix_le
|
||||
MD5Update(&md5 , (unsigned char *)prefix, prefix_len);
|
||||
|
||||
for(;;) {
|
||||
r = FS_Read2(buffer, sizeof(buffer), f);
|
||||
r = FS_Read(buffer, sizeof(buffer), f);
|
||||
if(r < 1)
|
||||
break;
|
||||
if(r + total > length)
|
||||
|
||||
@@ -659,7 +659,6 @@ int FS_FileIsInPAK(const char *filename, int *pChecksum );
|
||||
|
||||
int FS_Write( const void *buffer, int len, fileHandle_t f );
|
||||
|
||||
int FS_Read2( void *buffer, int len, fileHandle_t f );
|
||||
int FS_Read( void *buffer, int len, fileHandle_t f );
|
||||
// properly handles partial reads and reads from other dlls
|
||||
|
||||
|
||||
Reference in new issue
Block a user