mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-07 17:29:36 +00:00
use HAVE_* macros for dependencies
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
//=============================================================================//
|
||||
// This module implements the voice record and compression functions
|
||||
|
||||
#if HAVE_OPENAL
|
||||
//#include "audio_pch.h"
|
||||
//#include "voice.h"
|
||||
#include "tier0/platform.h"
|
||||
@@ -207,3 +208,5 @@ IVoiceRecord* CreateVoiceRecord_OpenAL(int sampleRate)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
@@ -522,7 +522,7 @@ DWORD __stdcall DownloadThread( void *voidPtr )
|
||||
}
|
||||
|
||||
|
||||
#elif defined( POSIX )
|
||||
#elif defined( POSIX ) && HAVE_CURL
|
||||
|
||||
#include "curl/curl.h"
|
||||
|
||||
|
||||
@@ -713,6 +713,7 @@ static bool CreateTempFilename( TempFilename_t &info, const char *filenameBase,
|
||||
// Gzip Filename to Filename.gz.
|
||||
static bool gzip_file_compress( const CUtlString &Filename )
|
||||
{
|
||||
#if HAVE_ZLIB
|
||||
bool bRet = false;
|
||||
|
||||
// Try to find a unique temp filename.
|
||||
@@ -758,6 +759,9 @@ static bool gzip_file_compress( const CUtlString &Filename )
|
||||
}
|
||||
|
||||
return bRet;
|
||||
#else
|
||||
return false;
|
||||
#endif
|
||||
}
|
||||
|
||||
static void FixupInvalidPathChars( char *filename )
|
||||
|
||||
@@ -1932,7 +1932,9 @@ static void VID_ProcessMovieFrame( const MovieInfo_t& info, bool jpeg, const cha
|
||||
bool bSuccess = false;
|
||||
if ( jpeg )
|
||||
{
|
||||
#if HAVE_JPEG
|
||||
bSuccess = videomode->TakeSnapshotJPEGToBuffer( outBuf, info.jpeg_quality );
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2001,6 +2003,7 @@ void CVideoMode_Common::WriteMovieFrame( const MovieInfo_t& info )
|
||||
delete[] hp;
|
||||
}
|
||||
|
||||
#if HAVE_JPEG
|
||||
//-----------------------------------------------------------------------------
|
||||
// Purpose: Expanded data destination object for CUtlBuffer output
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -2099,10 +2102,11 @@ GLOBAL(void) jpeg_UtlBuffer_dest (j_compress_ptr cinfo, CUtlBuffer *pBuffer )
|
||||
dest->pub.term_destination = term_destination;
|
||||
dest->pBuffer = pBuffer;
|
||||
}
|
||||
#endif
|
||||
|
||||
bool CVideoMode_Common::TakeSnapshotJPEGToBuffer( CUtlBuffer& buf, int quality )
|
||||
{
|
||||
#if !defined( _X360 )
|
||||
#if !defined( _X360 ) && HAVE_JPEG
|
||||
if ( g_LostVideoMemory )
|
||||
return false;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user