use HAVE_* macros for dependencies

This commit is contained in:
nillerusr
2022-08-19 23:19:53 +03:00
parent 0d48bf354a
commit c909de8faf
8 changed files with 81 additions and 24 deletions
@@ -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
+1 -1
View File
@@ -522,7 +522,7 @@ DWORD __stdcall DownloadThread( void *voidPtr )
}
#elif defined( POSIX )
#elif defined( POSIX ) && HAVE_CURL
#include "curl/curl.h"
+4
View File
@@ -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 )
+5 -1
View File
@@ -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;