]> de.git.xonotic.org Git - xonotic/netradiant.git/commitdiff
q3map2: better detection of Windows
authorThomas Debesse <dev@illwieckz.net>
Sun, 25 Nov 2018 00:26:46 +0000 (01:26 +0100)
committerThomas Debesse <dev@illwieckz.net>
Sat, 18 May 2019 21:11:32 +0000 (23:11 +0200)
tools/quake3/q3map2/path_init.c

index b208ecce7918745330767d4118dc718f5c11c690..725f2bbf81b9a75713eeb71012792430409448b5 100644 (file)
@@ -70,9 +70,9 @@ char                    *homeBasePath = NULL;
  */
 
 char *LokiGetHomeDir( void ){
-       #ifndef Q_UNIX
+       #if GDEF_OS_WINDOWS
        return NULL;
-       #else
+       #else // !GDEF_OS_WINDOWS
        static char     buf[ 4096 ];
        struct passwd   pw, *pwp;
        char            *home;
@@ -127,10 +127,10 @@ void LokiInitPaths( char *argv0 ){
        }
        #endif // (GDEF_OS_POSIX && !GDEF_OS_MACOS)
 
-       #ifndef Q_UNIX
+       #if GDEF_OS_WINDOWS
        /* this is kinda crap, but hey */
        strcpy( installPath, "../" );
-       #else
+       #else // !GDEF_OS_WINDOWS
 
        char temp[ MAX_OS_PATH ];
        char *path;
@@ -213,7 +213,7 @@ void LokiInitPaths( char *argv0 ){
                *( strrchr( installPath, '/' ) ) = '\0';
                *( strrchr( installPath, '/' ) ) = '\0';
        }
-       #endif
+       #endif // !GDEF_OS_WINDOWS
 }