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:
Alibek Omarov
2023-01-10 04:51:04 +03:00
parent 5d98e13fb8
commit eb0459a045
2 changed files with 18 additions and 19 deletions

View File

@@ -158,6 +158,22 @@ static void COM_GenerateClientLibraryPath( const char *name, char *out, size_t s
#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
@@ -193,6 +209,7 @@ static void COM_GenerateServerLibraryPath( char *out, size_t size )
ext = COM_FileExtension( dllpath );
COM_StripExtension( dllpath );
COM_StripIntelSuffix( dllpath );
COM_GenerateCommonLibraryName( dllpath, ext, out, size );
#endif
@@ -234,7 +251,7 @@ void COM_GetCommonLibraryPath( ECommonLibraryType eLibType, char *out, size_t si
}
break;
default:
ASSERT( true );
ASSERT( 0 );
out[0] = 0;
break;
}