mirror of
https://github.com/FWGS/xash3d-fwgs.git
synced 2026-08-05 19:45:05 +08:00
filesystem: hold mode fix
This commit is contained in:
@@ -2387,19 +2387,13 @@ static file_t *FS_SysOpen( const char *filepath, const char *mode )
|
||||
int mod, opt;
|
||||
uint ind;
|
||||
#if XASH_PSP
|
||||
#ifdef XASH_REDUCE_FD
|
||||
qboolean backup_hold = false;
|
||||
|
||||
// Hold file in open state
|
||||
if( mode[0] == '*' )
|
||||
{
|
||||
backup_hold = true;
|
||||
mode++;
|
||||
}
|
||||
|
||||
#endif
|
||||
// Parse the mode string
|
||||
switch( mode[0] )
|
||||
{
|
||||
case 'r': // read
|
||||
case 'r': // read
|
||||
mod = PSP_O_RDONLY;
|
||||
opt = 0;
|
||||
break;
|
||||
@@ -2428,6 +2422,11 @@ static file_t *FS_SysOpen( const char *filepath, const char *mode )
|
||||
break;
|
||||
case 'b': // not used
|
||||
break;
|
||||
#ifdef XASH_REDUCE_FD
|
||||
case 'h': // hold
|
||||
backup_hold = true;
|
||||
break;
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
@@ -117,8 +117,9 @@ stream_t *Stream_OpenMPG( const char *filename )
|
||||
file_t *file;
|
||||
int ret;
|
||||
wavinfo_t sc;
|
||||
#if XASH_PSP // hold mode
|
||||
file = FS_Open( filename, "*rb", false );
|
||||
#if XASH_PSP
|
||||
// h - hold mode
|
||||
file = FS_Open( filename, "rbh", false );
|
||||
#else
|
||||
file = FS_Open( filename, "rb", false );
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user