Skip to content

Commit

Permalink
Add patches for OpenBSD template.
Browse files Browse the repository at this point in the history
Add patches for	OpenBSD	template.
Patches fix support for mods from the game menu.
  • Loading branch information
tx00100xt committed Dec 29, 2023
1 parent 2df5942 commit d01991e
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Index: SamTFE/Sources/Engine/Engine.cpp
--- SamTFE/Sources/Engine/Engine.cpp.orig
+++ SamTFE/Sources/Engine/Engine.cpp
@@ -740,20 +740,9 @@
// Path vars
sys_iGameBits = (int)(CHAR_BIT * sizeof(void *));
CPrintF(TRANSV("Running %d-bit version\n"), sys_iGameBits);
+ sys_iSysPath = 1; // using system path

#ifdef PLATFORM_UNIX
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
- int _isystempath = strncmp((const char *)strExePath, (const char *) "/usr/local/bin/", (size_t) 15 );
-#elif defined(__NetBSD__)
- int _isystempath = strncmp((const char *)strExePath, (const char *) "/usr/pkg/bin/", (size_t) 13 );
-#else
- int _isystempath = strncmp((const char *)strExePath, (const char *) "/usr/bin/", (size_t) 9 );
-#endif
- if( _isystempath == 0 ) {
- sys_iSysPath = 1; // using system path
- } else {
- sys_iSysPath = 0; // using standarted path
- }

// get library path for mods
_fnmModLibPath = "";
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
Index: SamTSE/Sources/Engine/Engine.cpp
--- SamTSE/Sources/Engine/Engine.cpp.orig
+++ SamTSE/Sources/Engine/Engine.cpp
@@ -740,20 +740,9 @@
// Path vars
sys_iGameBits = (int)(CHAR_BIT * sizeof(void *));
CPrintF(TRANSV("Running %d-bit version\n"), sys_iGameBits);
+ sys_iSysPath = 1; // using system path

#ifdef PLATFORM_UNIX
-#if defined(__OpenBSD__) || defined(__FreeBSD__)
- int _isystempath = strncmp((const char *)strExePath, (const char *) "/usr/local/bin/", (size_t) 15 );
-#elif defined(__NetBSD__)
- int _isystempath = strncmp((const char *)strExePath, (const char *) "/usr/pkg/bin/", (size_t) 13 );
-#else
- int _isystempath = strncmp((const char *)strExePath, (const char *) "/usr/bin/", (size_t) 9 );
-#endif
- if( _isystempath == 0 ) {
- sys_iSysPath = 1; // using system path
- } else {
- sys_iSysPath = 0; // using standarted path
- }

// get library path for mods
_fnmModLibPath = "";

0 comments on commit d01991e

Please sign in to comment.