mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-03 05:49:41 +03:00
Initial android support
This commit is contained in:
@@ -357,19 +357,24 @@ bool FileSystem_GetExecutableDir( char *exedir, int exeDirLen )
|
||||
Q_strncat( exedir, libDir, exeDirLen, COPY_ALL_CHARACTERS );
|
||||
Q_FixSlashes( exedir );
|
||||
}
|
||||
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool FileSystem_GetBaseDir( char *baseDir, int baseDirLen )
|
||||
{
|
||||
#ifdef ANDROID
|
||||
strncpy(baseDir, getenv("VALVE_GAME_PATH"), baseDirLen);
|
||||
return true;
|
||||
#else
|
||||
if ( FileSystem_GetExecutableDir( baseDir, baseDirLen ) )
|
||||
{
|
||||
Q_StripFilename( baseDir );
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
void LaunchVConfig()
|
||||
@@ -549,6 +554,8 @@ FSReturnCode_t FileSystem_LoadSearchPaths( CFSSearchPathsInit &initInfo )
|
||||
if ( !FileSystem_GetBaseDir( baseDir, sizeof( baseDir ) ) )
|
||||
return SetupFileSystemError( false, FS_INVALID_PARAMETERS, "FileSystem_GetBaseDir failed." );
|
||||
|
||||
Msg("filesystem BaseDir: %s\n", baseDir);
|
||||
|
||||
// The MOD directory is always the one that contains gameinfo.txt
|
||||
Q_strncpy( initInfo.m_ModPath, initInfo.m_pDirectoryName, sizeof( initInfo.m_ModPath ) );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user