mirror of
https://github.com/nillerusr/source-engine.git
synced 2026-08-08 01:39:36 +00:00
BSD: Add support (#140)
* BSD: Add support * BSD: other fixes There is still a bug when vgui haven't got text, maybe because of resources. Also there is bug where when trying to start new game caption names shows wrong. * BSD: Debugging * BSD: modify preprocessor and fix windows * BSD: Remove debugging and fix labels in gameui * BSD: Remove disabling some DX9 commands * BSD: Remove -g flag
This commit is contained in:
@@ -28,13 +28,15 @@
|
||||
#include "vgui_key_translation.h"
|
||||
#include "filesystem.h"
|
||||
|
||||
#ifdef OSX
|
||||
#include <Carbon/Carbon.h>
|
||||
#if defined(OSX) || defined(BSD)
|
||||
#include <sys/param.h>
|
||||
#include <sys/mount.h>
|
||||
#elif defined(LINUX)
|
||||
#include <sys/vfs.h>
|
||||
#endif
|
||||
#ifdef OSX
|
||||
#include <Carbon/Carbon.h>
|
||||
#endif
|
||||
|
||||
#ifdef USE_SDL
|
||||
#include "SDL_clipboard.h"
|
||||
@@ -290,7 +292,7 @@ void CSystem::ShellExecute(const char *command, const char *file)
|
||||
if ( pid == 0 )
|
||||
{
|
||||
// Child
|
||||
#ifdef LINUX
|
||||
#if defined(LINUX) || defined(BSD)
|
||||
// Escape steam runtime if necessary
|
||||
const char *szSteamRuntime = getenv( "STEAM_RUNTIME" );
|
||||
if ( szSteamRuntime )
|
||||
@@ -585,7 +587,7 @@ int CSystem::GetAvailableDrives(char *buf, int bufLen)
|
||||
//-----------------------------------------------------------------------------
|
||||
double CSystem::GetFreeDiskSpace(const char *path)
|
||||
{
|
||||
#if __DARWIN_ONLY_64_BIT_INO_T
|
||||
#if __DARWIN_ONLY_64_BIT_INO_T || BSD
|
||||
// MoeMod: newer macOS only support 64bit, so no statfs64 is provided
|
||||
struct statfs buf;
|
||||
int ret = statfs( path, &buf );
|
||||
|
||||
Reference in New Issue
Block a user