Fixed it little more (so default behaviour is same for win32 and linux

now)


git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@182 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
gewlitys
2002-10-29 01:16:12 +00:00
parent 0b69b6a016
commit 5aa6d15dcd
+8 -12
View File
@@ -34,19 +34,19 @@
void void
CDToContentDir (char *contentdir) CDToContentDir (char *contentdir)
{ {
char *testfile = "starcon.txt"; char *testfile = "starcon.txt";
if (!FileExists (testfile)) if (!FileExists (testfile))
{ {
if (chdir (contentdir) || !FileExists (testfile)) if (chdir (contentdir) || !FileExists (testfile))
{ {
if (chdir ("content") || !FileExists (testfile)) if (chdir ("../../content") || !FileExists (testfile))
{ {
fprintf(stderr, "Fatal error: content not available, running from wrong dir?\n"); fprintf(stderr, "Fatal error: content not available, running from wrong dir?\n");
exit(-1); exit(-1);
} }
} }
} }
} }
int int
@@ -83,11 +83,7 @@ main (int argc, char *argv[])
fprintf (stderr, "The Ur-Quan Masters v%d.%d (compiled %s %s)\n", UQM_MAJOR_VERSION, UQM_MINOR_VERSION, __DATE__, __TIME__); fprintf (stderr, "The Ur-Quan Masters v%d.%d (compiled %s %s)\n", UQM_MAJOR_VERSION, UQM_MINOR_VERSION, __DATE__, __TIME__);
#ifndef WIN32
strcpy (contentdir, "content"); strcpy (contentdir, "content");
#else
strcpy (contentdir, "../../content");
#endif
while ((c = getopt_long(argc, argv, "r:d:fob:ptc:?hM:S:T:emq:", long_options, &option_index)) != -1) while ((c = getopt_long(argc, argv, "r:d:fob:ptc:?hM:S:T:emq:", long_options, &option_index)) != -1)
{ {