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
+7 -13
View File
@@ -10,7 +10,7 @@
#include <windows.h>
#include "shlwapi.h" // registry stuff
#include <direct.h>
#elif defined ( LINUX ) || defined( OSX )
#elif defined(POSIX)
#define O_EXLOCK 0
#include <sys/types.h>
#include <sys/stat.h>
@@ -205,7 +205,7 @@ class CVCRHelpers : public IVCRHelpers
public:
virtual void ErrorMessage( const char *pMsg )
{
#if defined( WIN32 ) || defined( LINUX )
#if defined( WIN32 ) || defined( LINUX ) || defined(BSD)
NOVCR( ::MessageBox( NULL, pMsg, "VCR Error", MB_OK ) );
#endif
}
@@ -950,7 +950,7 @@ bool GrabSourceMutex()
#ifdef ANDROID
return true;
#elif defined (LINUX)
#elif defined (LINUX) || defined(BSD)
/*
* Linux
*/
@@ -1198,7 +1198,7 @@ DLL_EXPORT int LauncherMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR
DLL_EXPORT int LauncherMain( int argc, char **argv )
#endif
{
#if defined LINUX && !defined ANDROID
#if (defined(LINUX) || defined(BSD)) && !defined ANDROID
// Temporary fix to stop us from crashing in printf/sscanf functions that don't expect
// localization to mess with your "." and "," float seperators. Mac OSX also sets LANG
// to en_US.UTF-8 before starting up (in info.plist I believe).
@@ -1225,7 +1225,7 @@ DLL_EXPORT int LauncherMain( int argc, char **argv )
Msg("SDL version: %d.%d.%d rev: %s\n", (int)ver.major, (int)ver.minor, (int)ver.patch, SDL_GetRevision());
#endif
#if defined LINUX && defined USE_SDL && defined TOGLES && !defined ANDROID
#if (defined LINUX || defined BSD) && defined USE_SDL && defined TOGLES && !defined ANDROID
SDL_SetHint(SDL_HINT_VIDEO_X11_FORCE_EGL, "1");
#endif
@@ -1247,12 +1247,6 @@ DLL_EXPORT int LauncherMain( int argc, char **argv )
// Hook the debug output stuff.
SpewOutputFunc( LauncherDefaultSpewFunc );
if ( 0 && IsWin98OrOlder() )
{
Error( "This build does not currently run under Windows 98/Me." );
return -1;
}
// Quickly check the hardware key, essentially a warning shot.
if ( !Plat_VerifyHardwareKeyPrompt() )
{
@@ -1559,7 +1553,7 @@ DLL_EXPORT int LauncherMain( int argc, char **argv )
RegCloseKey(hKey);
}
#elif defined( OSX ) || defined( LINUX )
#elif defined( OSX ) || defined( LINUX ) || defined(BSD)
struct stat st;
if ( stat( RELAUNCH_FILE, &st ) == 0 )
{
@@ -1576,7 +1570,7 @@ DLL_EXPORT int LauncherMain( int argc, char **argv )
}
szCmd[nChars] = 0;
char szOpenLine[ MAX_PATH ];
#if defined( LINUX )
#if defined( LINUX ) || defined(BSD)
Q_snprintf( szOpenLine, sizeof(szOpenLine), "xdg-open \"%s\"", szCmd );
#else
Q_snprintf( szOpenLine, sizeof(szOpenLine), "open \"%s\"", szCmd );