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:
Er2
2022-11-24 22:04:29 +03:00
committed by GitHub
parent 807eaae850
commit 53bd92f7a8
49 changed files with 221 additions and 178 deletions
+6 -4
View File
@@ -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 );