Browse Source

game_launch: fix Windows build (as suggested by @SNMetamorph)

pull/2/head
Alibek Omarov 2 years ago
parent
commit
f467d0c807
  1. 6
      engine/common/launcher.c
  2. 3
      game_launch/game.cpp

6
engine/common/launcher.c

@ -25,7 +25,11 @@ GNU General Public License for more details. @@ -25,7 +25,11 @@ GNU General Public License for more details.
#include <emscripten.h>
#endif
#include <unistd.h>
#if XASH_WIN32
#include <process.h> // _execve
#else
#include <unistd.h> // execve
#endif
extern char **environ;
static char szGameDir[128]; // safe place to keep gamedir

3
game_launch/game.cpp

@ -20,14 +20,15 @@ GNU General Public License for more details. @@ -20,14 +20,15 @@ GNU General Public License for more details.
#include <string.h>
#include <stdlib.h>
#include <stdarg.h>
#include <unistd.h>
#if XASH_POSIX
#define XASHLIB "libxash." OS_LIB_EXT
#include <unistd.h> // execve
#elif XASH_WIN32
#define XASHLIB "xash.dll"
#define dlerror() GetStringLastError()
#include <shellapi.h> // CommandLineToArgvW
#include <process.h> // _execve
#else
#error // port me!
#endif

Loading…
Cancel
Save