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

View File

@@ -3,7 +3,7 @@
#ifdef ANDROID
#include <sys/cdefs.h>
#elif defined(OSX)
#elif defined(OSX) || defined(BSD)
#include <stdint.h>
#else
#include <bits/wordsize.h>

View File

@@ -17,7 +17,7 @@
#include "filesystem.h"
#include "vguifont.h"
#if defined(LINUX) || defined(OSX)
#ifdef POSIX
#include <ft2build.h>
#include FT_FREETYPE_H
typedef void *(*FontDataHelper)( const char *pchFontName, int &size, const char *fontFileName );
@@ -71,7 +71,7 @@ public:
IFileSystem *FileSystem() { return m_pFileSystem; }
IMaterialSystem *MaterialSystem() { return m_pMaterialSystem; }
#if defined(LINUX) || defined(OSX)
#ifdef POSIX
FT_Library GetFontLibraryHandle() { return library; }
void SetFontDataHelper( FontDataHelper helper ) { m_pFontDataHelper = helper; }
#endif
@@ -96,7 +96,7 @@ private:
CUtlVector<CFontAmalgam> m_FontAmalgams;
CUtlVector<font_t *> m_Win32Fonts;
#if defined(LINUX) || defined(OSX)
#ifdef POSIX
FT_Library library;
FontDataHelper m_pFontDataHelper;
#endif

View File

@@ -23,7 +23,7 @@ struct newChar_t
#ifdef WIN32
#include "Win32Font.h"
typedef CWin32Font font_t;
#elif defined(LINUX) || defined(OSX)
#elif defined(POSIX)
#include "linuxfont.h"
typedef CLinuxFont font_t;
#else
@@ -31,4 +31,4 @@ typedef CLinuxFont font_t;
#endif
#endif //VGUIFONT_H
#endif //VGUIFONT_H