mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-17 18:40:02 +00:00
engine: strip Intel suffixes from server library name, but only on special platforms
Remove same code from filesystem, it's not what filesystem should do
This commit is contained in:
parent
5d98e13fb8
commit
eb0459a045
@ -158,6 +158,22 @@ static void COM_GenerateClientLibraryPath( const char *name, char *out, size_t s
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
==============
|
||||||
|
COM_StripIntelSuffix
|
||||||
|
|
||||||
|
Some modders use _i?86 suffix in game library name
|
||||||
|
So strip it to follow library naming for non-Intel CPUs
|
||||||
|
==============
|
||||||
|
*/
|
||||||
|
static void COM_StripIntelSuffix( char *out )
|
||||||
|
{
|
||||||
|
char *suffix = Q_strrchr( out, '_' );
|
||||||
|
|
||||||
|
if( suffix && Q_stricmpext( "_i?86", suffix ))
|
||||||
|
*suffix = 0;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
==============
|
==============
|
||||||
COM_GenerateServerLibraryPath
|
COM_GenerateServerLibraryPath
|
||||||
@ -193,6 +209,7 @@ static void COM_GenerateServerLibraryPath( char *out, size_t size )
|
|||||||
|
|
||||||
ext = COM_FileExtension( dllpath );
|
ext = COM_FileExtension( dllpath );
|
||||||
COM_StripExtension( dllpath );
|
COM_StripExtension( dllpath );
|
||||||
|
COM_StripIntelSuffix( dllpath );
|
||||||
|
|
||||||
COM_GenerateCommonLibraryName( dllpath, ext, out, size );
|
COM_GenerateCommonLibraryName( dllpath, ext, out, size );
|
||||||
#endif
|
#endif
|
||||||
@ -234,7 +251,7 @@ void COM_GetCommonLibraryPath( ECommonLibraryType eLibType, char *out, size_t si
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
ASSERT( true );
|
ASSERT( 0 );
|
||||||
out[0] = 0;
|
out[0] = 0;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
@ -625,24 +625,6 @@ void FS_ParseGenericGameInfo( gameinfo_t *GameInfo, const char *buf, const qbool
|
|||||||
else if( !Q_stricmp( token, "gamedll_linux" ))
|
else if( !Q_stricmp( token, "gamedll_linux" ))
|
||||||
{
|
{
|
||||||
pfile = COM_ParseFile( pfile, GameInfo->game_dll_linux, sizeof( GameInfo->game_dll_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;
|
found_linux = true;
|
||||||
}
|
}
|
||||||
// valid for both
|
// valid for both
|
||||||
|
Loading…
x
Reference in New Issue
Block a user