*/
#include "environment.h"
+#include "globaldefs.h"
#include "stream/textstream.h"
#include "string/string.h"
// TODO add more games to this
// try to detect Nexuiz installs
-#if defined( WIN32 )
+#if GDEF_OS_WINDOWS
if ( gamedetect_check_game( "nexuiz.game", "data/common-spog.pk3", "nexuiz.exe", buf, p - buf ) )
-#elif defined( __APPLE__ )
+#elif GDEF_OS_MACOS
if ( gamedetect_check_game( "nexuiz.game", "data/common-spog.pk3", "Nexuiz.app/Contents/Info.plist", buf, p - buf ) )
#else
if ( gamedetect_check_game( "nexuiz.game", "data/common-spog.pk3", "nexuiz-linux-glx.sh", buf, p - buf ) )
return false;
}
-#if defined( POSIX )
+#if GDEF_OS_POSIX
#include <stdlib.h>
#include <pwd.h>
#include <glib.h>
const char* LINK_NAME =
-#if defined ( __linux__ )
+#if GDEF_OS_LINUX
"/proc/self/exe"
#else // FreeBSD and OSX
"/proc/curproc/file"
gamedetect();
}
-#elif defined( WIN32 )
+#elif GDEF_OS_WINDOWS
#include <windows.h>
-void environment_init( int argc, char* argv[] ){
+void environment_init( int argc, char const* argv[] ){
args_init( argc, argv );
{