Merge branch 'master' into windows

This commit is contained in:
HappyDOGE
2022-07-27 12:58:56 +03:00
3089 changed files with 38639 additions and 844820 deletions
+8
View File
@@ -30,6 +30,8 @@
#ifdef OSX
#include <Carbon/Carbon.h>
#include <sys/param.h>
#include <sys/mount.h>
#elif defined(LINUX)
#include <sys/vfs.h>
#endif
@@ -583,8 +585,14 @@ int CSystem::GetAvailableDrives(char *buf, int bufLen)
//-----------------------------------------------------------------------------
double CSystem::GetFreeDiskSpace(const char *path)
{
#if __DARWIN_ONLY_64_BIT_INO_T
// MoeMod: newer macOS only support 64bit, so no statfs64 is provided
struct statfs buf;
int ret = statfs( path, &buf );
#else
struct statfs64 buf;
int ret = statfs64( path, &buf );
#endif
if ( ret < 0 )
return 0.0;
return (double) ( buf.f_bsize * buf.f_bfree );
+4
View File
@@ -26,7 +26,11 @@
#include <assert.h>
#include <stdio.h>
#include <stdarg.h>
#ifdef OSX
#include <malloc/malloc.h>
#else
#include <malloc.h>
#endif
#include <tier0/dbg.h>
#include <tier1/utlhandletable.h>
#include "vgui_internal.h"