mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-04 18:09:53 +03:00
Merge branch 'master' into windows
This commit is contained in:
@@ -306,7 +306,7 @@ CQueuedLoader::CQueuedLoader() : BaseClass( false )
|
||||
V_memset( m_pLoaders, 0, sizeof( m_pLoaders ) );
|
||||
|
||||
// set resource dictionaries sort context
|
||||
for ( int i = 0; i < RESOURCEPRELOAD_COUNT; i++ )
|
||||
for ( intp i = 0; i < RESOURCEPRELOAD_COUNT; i++ )
|
||||
{
|
||||
m_ResourceNames[i].SetLessContext( (void *)i );
|
||||
}
|
||||
@@ -643,7 +643,7 @@ FileNameHandle_t CQueuedLoader::FindFilename( const char *pFilename )
|
||||
//-----------------------------------------------------------------------------
|
||||
bool CQueuedLoader::CResourceNameLessFunc::Less( const FileNameHandle_t &hFilenameLHS, const FileNameHandle_t &hFilenameRHS, void *pCtx )
|
||||
{
|
||||
switch ( (int)pCtx )
|
||||
switch ( (intp)pCtx )
|
||||
{
|
||||
case RESOURCEPRELOAD_MATERIAL:
|
||||
{
|
||||
|
||||
@@ -1804,7 +1804,7 @@ const char *CBaseFileSystem::GetWritePath( const char *pFilename, const char *pa
|
||||
//-----------------------------------------------------------------------------
|
||||
// Reads/writes files to utlbuffers. Attempts alignment fixups for optimal read
|
||||
//-----------------------------------------------------------------------------
|
||||
CThreadLocal<char *> g_pszReadFilename;
|
||||
CTHREADLOCAL(char *) g_pszReadFilename;
|
||||
bool CBaseFileSystem::ReadToBuffer( FileHandle_t fp, CUtlBuffer &buf, int nMaxBytes, FSAllocFunc_t pfnAlloc )
|
||||
{
|
||||
SetBufferSize( fp, 0 ); // TODO: what if it's a pack file? restore buffer size?
|
||||
@@ -3445,7 +3445,7 @@ void CBaseFileSystem::EnableWhitelistFileTracking( bool bEnable, bool bCacheAllV
|
||||
{
|
||||
Error( "CBaseFileSystem::EnableWhitelistFileTracking called more than once." );
|
||||
}
|
||||
|
||||
|
||||
m_WhitelistFileTrackingEnabled = bEnable;
|
||||
if ( m_WhitelistFileTrackingEnabled && bCacheAllVPKHashes )
|
||||
{
|
||||
@@ -3619,6 +3619,9 @@ void CBaseFileSystem::NotifyFileUnloaded( const char *pszFilename, const char *p
|
||||
|
||||
void CBaseFileSystem::SetSearchPathIsTrustedSource( CSearchPath *pSearchPath )
|
||||
{
|
||||
#if 1
|
||||
pSearchPath->m_bIsTrustedForPureServer = true;
|
||||
#else // Broken, I am lazy to fix this
|
||||
// Most paths are not considered trusted
|
||||
pSearchPath->m_bIsTrustedForPureServer = false;
|
||||
|
||||
@@ -3675,6 +3678,7 @@ void CBaseFileSystem::SetSearchPathIsTrustedSource( CSearchPath *pSearchPath )
|
||||
Msg( "Setting %s as untrusted. (Key not in trusted key list)\n", pSearchPath->GetDebugString() );
|
||||
#endif
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -122,11 +122,11 @@ public:
|
||||
Q_strncpy( szFixedName, pszFilename, sizeof( szFixedName ) );
|
||||
Q_FixSlashes( szFixedName );
|
||||
|
||||
Assert( (int)FS_INVALID_ASYNC_FILE == m_map.InvalidIndex() );
|
||||
Assert( (intp)FS_INVALID_ASYNC_FILE == m_map.InvalidIndex() );
|
||||
|
||||
AUTO_LOCK( m_mutex );
|
||||
|
||||
int iEntry = m_map.Find( szFixedName );
|
||||
intp iEntry = m_map.Find( szFixedName );
|
||||
if ( iEntry == m_map.InvalidIndex() )
|
||||
{
|
||||
iEntry = m_map.Insert( strdup( szFixedName ), new AsyncOpenedFile_t );
|
||||
@@ -146,7 +146,7 @@ public:
|
||||
|
||||
AUTO_LOCK( m_mutex );
|
||||
|
||||
int iEntry = m_map.Find( szFixedName );
|
||||
intp iEntry = m_map.Find( szFixedName );
|
||||
if ( iEntry != m_map.InvalidIndex() )
|
||||
{
|
||||
m_map[iEntry]->AddRef();
|
||||
@@ -164,7 +164,7 @@ public:
|
||||
|
||||
AUTO_LOCK( m_mutex );
|
||||
|
||||
int iEntry = (CUtlMap<CUtlString, AsyncOpenedFile_t>::IndexType_t)(int)item;
|
||||
int iEntry = (CUtlMap<CUtlString, AsyncOpenedFile_t>::IndexType_t)(intp)item;
|
||||
Assert( m_map.IsValidIndex( iEntry ) );
|
||||
m_map[iEntry]->AddRef();
|
||||
return m_map[iEntry];
|
||||
@@ -179,7 +179,7 @@ public:
|
||||
|
||||
AUTO_LOCK( m_mutex );
|
||||
|
||||
int iEntry = (CUtlMap<CUtlString, AsyncOpenedFile_t>::IndexType_t)(int)item;
|
||||
int iEntry = (CUtlMap<CUtlString, AsyncOpenedFile_t>::IndexType_t)(intp)item;
|
||||
Assert( m_map.IsValidIndex( iEntry ) );
|
||||
m_map[iEntry]->AddRef();
|
||||
}
|
||||
@@ -193,7 +193,7 @@ public:
|
||||
|
||||
AUTO_LOCK( m_mutex );
|
||||
|
||||
int iEntry = (CUtlMap<CUtlString, AsyncOpenedFile_t>::IndexType_t)(int)item;
|
||||
int iEntry = (CUtlMap<CUtlString, AsyncOpenedFile_t>::IndexType_t)(intp)item;
|
||||
Assert( m_map.IsValidIndex( iEntry ) );
|
||||
if ( m_map[iEntry]->Release() == 0 )
|
||||
{
|
||||
@@ -488,7 +488,7 @@ public:
|
||||
{
|
||||
if ( m_pData && m_bFreeMemory )
|
||||
{
|
||||
free( (void*) m_pData );
|
||||
delete[] (char*)m_pData;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
#ifdef SUPPORT_PACKED_STORE
|
||||
|
||||
unsigned ThreadStubProcessMD5Requests( void *pParam )
|
||||
uintp ThreadStubProcessMD5Requests( void *pParam )
|
||||
{
|
||||
return ((CFileTracker2 *)pParam)->ThreadedProcessMD5Requests();
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ HANDLE FindFirstFile( const char *fileName, FIND_DATA *dat)
|
||||
{
|
||||
char nameStore[PATH_MAX];
|
||||
char *dir=NULL;
|
||||
int n,iret=-1;
|
||||
intp n,iret=-1;
|
||||
|
||||
Q_strncpy(nameStore,fileName, sizeof( nameStore ) );
|
||||
|
||||
|
||||
@@ -46,8 +46,8 @@ def build(bld):
|
||||
|
||||
defines = []
|
||||
|
||||
libs = ['tier0','tier1','tier2','vstdlib','vpklib']
|
||||
|
||||
libs = ['tier0','vpklib','tier1','tier2','vstdlib']
|
||||
|
||||
if bld.env.DEST_OS == 'win32':
|
||||
libs += ['SHELL32']
|
||||
|
||||
|
||||
Reference in New Issue
Block a user