Skip to content

Commit

Permalink
filesystem: Don't look for xlsppatch on PC, #ifdef AddXLSPUpdateSearc…
Browse files Browse the repository at this point in the history
…hPath function out on pc
  • Loading branch information
tyabus committed Sep 7, 2023
1 parent 4192fa5 commit 19091bd
Showing 1 changed file with 9 additions and 14 deletions.
23 changes: 9 additions & 14 deletions filesystem/basefilesystem.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -456,7 +456,10 @@ CUtlSortVector< DLCContent_t, CDLCLess > CBaseFileSystem::m_DLCContents;
CUtlVector< DLCCorrupt_t > CBaseFileSystem::m_CorruptDLC;

CUtlBuffer g_UpdateZipBuffer;

#ifdef _X360
CUtlBuffer g_XLSPPatchZipBuffer;
#endif

class CStoreIDEntry
{
Expand Down Expand Up @@ -2877,16 +2880,8 @@ void CBaseFileSystem::AddSearchPath( const char *pPath, const char *pathID, Sear
V_strncpy( szPathHead, pPath, sizeof( szPathHead ) );
V_StripLastDir( szPathHead, sizeof( szPathHead ) );

// xlsppatch trumps all
V_ComposeFileName( szPathHead, "xlsppatch", szUpdatePath, sizeof( szUpdatePath ) );
struct _stat buf;
if ( FS_stat( szUpdatePath, &buf ) != -1 )
{
// found
AddSearchPathInternal( szUpdatePath, pathID, addType, true );
}

// followed by update
struct _stat buf;
V_ComposeFileName( szPathHead, "update", szUpdatePath, sizeof( szUpdatePath ) );
if ( FS_stat( szUpdatePath, &buf ) != -1 )
{
Expand Down Expand Up @@ -8399,11 +8394,7 @@ void CBaseFileSystem::PrintDLCInfo()

bool CBaseFileSystem::AddXLSPUpdateSearchPath( const void *pData, int nSize )
{
if ( IsPC() )
{
return false;
}

#ifdef _X360
const char *targetPathIDs[] = { "PLATFORM", "GAME", "MOD" };
for ( int i = 0; i <ARRAYSIZE( targetPathIDs ); i++ )
{
Expand Down Expand Up @@ -8500,6 +8491,10 @@ bool CBaseFileSystem::AddXLSPUpdateSearchPath( const void *pData, int nSize )
}

return bXLSPPatchValid;
#else
Assert( 0 ); // should not be reached on pc
return false;
#endif
}

void CBaseFileSystem::MarkLocalizedPath( CSearchPath *sp )
Expand Down

0 comments on commit 19091bd

Please sign in to comment.