mirror of
https://github.com/ioquake/ioq3.git
synced 2025-06-02 09:51:21 +00:00
Remove FS_Read2().
Functionally the same as FS_Read().
Streaming functionality was removed in 672cfbf16f
but flag remained.
This commit is contained in:
parent
b173ac0599
commit
d4e1a01f33
7 changed files with 5 additions and 39 deletions
|
@ -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;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue