mirror of
https://github.com/celisej567/source-engine.git
synced 2026-01-04 18:09:53 +03:00
Fix macOS build (#146)
* Fix macOS build * Fix *BSD build * Add missing *BSD include
This commit is contained in:
@@ -28,7 +28,7 @@
|
||||
#include "vgui_key_translation.h"
|
||||
#include "filesystem.h"
|
||||
|
||||
#if defined(OSX) || defined(BSD)
|
||||
#if defined(OSX) || defined(PLATFORM_BSD)
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#elif defined(LINUX)
|
||||
@@ -292,7 +292,7 @@ void CSystem::ShellExecute(const char *command, const char *file)
|
||||
if ( pid == 0 )
|
||||
{
|
||||
// Child
|
||||
#if defined(LINUX) || defined(BSD)
|
||||
#if defined(LINUX) || defined(PLATFORM_BSD)
|
||||
// Escape steam runtime if necessary
|
||||
const char *szSteamRuntime = getenv( "STEAM_RUNTIME" );
|
||||
if ( szSteamRuntime )
|
||||
@@ -587,7 +587,7 @@ int CSystem::GetAvailableDrives(char *buf, int bufLen)
|
||||
//-----------------------------------------------------------------------------
|
||||
double CSystem::GetFreeDiskSpace(const char *path)
|
||||
{
|
||||
#if __DARWIN_ONLY_64_BIT_INO_T || BSD
|
||||
#if __DARWIN_ONLY_64_BIT_INO_T || PLATFORM_BSD
|
||||
// MoeMod: newer macOS only support 64bit, so no statfs64 is provided
|
||||
struct statfs buf;
|
||||
int ret = statfs( path, &buf );
|
||||
|
||||
@@ -584,7 +584,7 @@ FallbackFont_t g_FallbackFonts[] =
|
||||
{ NULL, "Monaco" } // every other font falls back to this
|
||||
};
|
||||
|
||||
#elif defined(LINUX) || defined(BSD)
|
||||
#elif defined(LINUX) || defined(PLATFORM_BSD)
|
||||
static const char *g_szValidAsianFonts[] = { "Marlett", "WenQuanYi Zen Hei", "unifont", NULL };
|
||||
|
||||
// list of how fonts fallback
|
||||
@@ -649,7 +649,7 @@ const char *CFontManager::GetForeignFallbackFontName()
|
||||
return "Tahoma";
|
||||
#elif defined(OSX)
|
||||
return "Helvetica";
|
||||
#elif defined(LINUX) || defined(BSD)
|
||||
#elif defined(LINUX) || defined(PLATFORM_BSD)
|
||||
return "WenQuanYi Zen Hei";
|
||||
#elif defined(_PS3)
|
||||
return "Tahoma";
|
||||
|
||||
Reference in New Issue
Block a user