Fix macOS build (#146)

* Fix macOS build
* Fix *BSD build
* Add missing *BSD include
This commit is contained in:
exstrim401
2022-11-27 16:48:27 +03:00
committed by GitHub
parent 53bd92f7a8
commit 2fb712af66
45 changed files with 107 additions and 98 deletions
+1 -1
View File
@@ -10,7 +10,7 @@
#include <windows.h>
#elif defined( OSX )
#include <Carbon/Carbon.h>
#elif defined( LINUX ) || defined(BSD)
#elif defined( LINUX ) || defined(PLATFORM_BSD)
//#error
#elif defined( _X360 )
#else
+4 -4
View File
@@ -146,7 +146,7 @@ CMatSystemSurface g_MatSystemSurface;
EXPOSE_SINGLE_INTERFACE_GLOBALVAR( CMatSystemSurface, ISurface,
VGUI_SURFACE_INTERFACE_VERSION, g_MatSystemSurface );
#if defined(LINUX) || defined(OSX) || defined(BSD)
#if defined(LINUX) || defined(OSX) || defined(PLATFORM_BSD)
CUtlDict< CMatSystemSurface::font_entry, unsigned short > CMatSystemSurface::m_FontData;
#endif
@@ -407,7 +407,7 @@ InitReturnVal_t CMatSystemSurface::Init( void )
FontManager().SetLanguage( "english" );
}
#if defined(LINUX) || defined(OSX) || defined(BSD)
#if defined(LINUX) || defined(OSX) || defined(PLATFORM_BSD)
FontManager().SetFontDataHelper( &CMatSystemSurface::FontDataHelper );
#endif
@@ -1907,7 +1907,7 @@ bool CMatSystemSurface::AddCustomFontFile( const char *fontName, const char *fon
}
Assert( success );
return success;
#elif defined(LINUX) || defined(OSX) || defined(BSD)
#elif defined(LINUX) || defined(OSX) || defined(PLATFORM_BSD)
int size;
if ( CMatSystemSurface::FontDataHelper( fontName, size, fontFileName ) )
@@ -1921,7 +1921,7 @@ bool CMatSystemSurface::AddCustomFontFile( const char *fontName, const char *fon
#endif
}
#if defined(LINUX) || defined(OSX) || defined(BSD)
#if defined(LINUX) || defined(OSX) || defined(PLATFORM_BSD)
static void RemoveSpaces( CUtlString &str )
{
+1 -1
View File
@@ -556,7 +556,7 @@ private:
int m_nFullscreenViewportHeight;
ITexture *m_pFullscreenRenderTarget;
#if defined(LINUX) || defined(OSX) || defined(BSD)
#if defined(LINUX) || defined(OSX) || defined(PLATFORM_BSD)
struct font_entry
{
void *data;