mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-03 05:49:41 +03:00
Upload
This commit is contained in:
@@ -341,14 +341,20 @@ bool FileSystem_GetExecutableDir( char *exedir, int exeDirLen )
|
||||
|
||||
Q_FixSlashes( exedir );
|
||||
|
||||
#ifdef ANDROID
|
||||
const char* libDir = "lib";
|
||||
#else
|
||||
const char* libDir = "bin";
|
||||
#endif
|
||||
|
||||
// Return the bin directory as the executable dir if it's not in there
|
||||
// because that's really where we're running from...
|
||||
char ext[MAX_PATH];
|
||||
Q_StrRight( exedir, 4, ext, sizeof( ext ) );
|
||||
if ( ext[0] != CORRECT_PATH_SEPARATOR || Q_stricmp( ext+1, "bin" ) != 0 )
|
||||
if ( ext[0] != CORRECT_PATH_SEPARATOR || Q_stricmp( ext+1, libDir ) != 0 )
|
||||
{
|
||||
Q_strncat( exedir, CORRECT_PATH_SEPARATOR_S, exeDirLen, COPY_ALL_CHARACTERS );
|
||||
Q_strncat( exedir, "bin", exeDirLen, COPY_ALL_CHARACTERS );
|
||||
Q_strncat( exedir, libDir, exeDirLen, COPY_ALL_CHARACTERS );
|
||||
Q_FixSlashes( exedir );
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user