filesystem: try to normalize linux gamedll path for liblist.gam

This commit is contained in:
Alibek Omarov 2022-11-02 15:58:41 +06:00
parent 5d73c6cb84
commit adb8ec1da8
1 changed files with 18 additions and 0 deletions

View File

@ -746,6 +746,24 @@ void FS_ParseGenericGameInfo( gameinfo_t *GameInfo, const char *buf, const qbool
else if( !Q_stricmp( token, "gamedll_linux" ))
{
pfile = COM_ParseFile( pfile, GameInfo->game_dll_linux, sizeof( GameInfo->game_dll_linux ));
// try to normalize filename only for liblist.gam
// from hl_i?86.so to hl.so
if( !isGameInfo )
{
char *p;
COM_StripExtension( GameInfo->game_dll_linux );
p = Q_strrchr( GameInfo->game_dll_linux, '_' );
if( p && Q_stricmpext( "_i?86", p ))
{
*p = 0;
}
COM_DefaultExtension( GameInfo->game_dll_linux, "."OS_LIB_EXT );
}
found_linux = true;
}
// valid for both