Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKent Mein <mein@cs.umn.edu>2007-06-27 19:08:31 +0400
committerKent Mein <mein@cs.umn.edu>2007-06-27 19:08:31 +0400
commit470dda4a210b5f7cde897433b2114093c13a66cd (patch)
tree9bb9a3c6d5fe3f84015a8aae99ada76320ce35bf /source/gameengine/GamePlayer/ghost
parentfbabee6ccc73621be3c3a00f1ead2eab0c381063 (diff)
This is a fix for game engine bug #6667
http://projects.blender.org/tracker/index.php?func=detail&aid=6667&group_id=9&atid=306 I moved some of the X11 initation code down a little bit so that if you run gameplayer with no args or gameplayer -h it will not crash even if you do not have X11 present. (All it does is print usage) Kent
Diffstat (limited to 'source/gameengine/GamePlayer/ghost')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp29
1 files changed, 11 insertions, 18 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index b0eb1d9c2ca..ab8f3eb3969 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -34,10 +34,6 @@
#include <iostream>
#include <math.h>
-#ifdef HAVE_CONFIG_H
-#include <config.h>
-#endif
-
#ifdef __linux__
#ifdef __alpha__
#include <signal.h>
@@ -290,7 +286,7 @@ int main(int argc, char** argv)
bool fullScreenParFound = false;
bool windowParFound = false;
bool closeConsole = true;
- RAS_IRasterizer::StereoMode stereomode = RAS_IRasterizer::RAS_STEREO_NOSTEREO;
+ RAS_IRasterizer::StereoMode stereomode;
bool stereoWindow = false;
bool stereoParFound = false;
int windowLeft = 100;
@@ -301,7 +297,7 @@ int main(int argc, char** argv)
GHOST_TUns32 fullScreenHeight= 0;
int fullScreenBpp = 32;
int fullScreenFrequency = 60;
-
+
#ifdef __linux__
#ifdef __alpha__
signal (SIGFPE, SIG_IGN);
@@ -334,12 +330,9 @@ int main(int argc, char** argv)
GEN_init_messaging_system();
// Parse command line options
-#ifdef WIN32
#ifndef NDEBUG
printf("argv[0] = '%s'\n", argv[0]);
#endif
-#endif //WIN32
-
#ifdef WIN32
if (scr_saver_init(argc, argv))
@@ -370,11 +363,9 @@ int main(int argc, char** argv)
;)
{
-#ifdef WIN32
#ifndef NDEBUG
printf("argv[%d] = '%s' , %i\n", i, argv[i],argc);
#endif
-#endif //WIN32
if (argv[i][0] == '-')
{
switch (argv[i][1])
@@ -397,11 +388,9 @@ int main(int argc, char** argv)
SYS_WriteCommandLineInt(syshandle, paramname, atoi(argv[i]));
SYS_WriteCommandLineFloat(syshandle, paramname, atof(argv[i]));
SYS_WriteCommandLineString(syshandle, paramname, argv[i]);
-#ifdef WIN32
#ifndef NDEBUG
printf("%s = '%s'\n", paramname, argv[i]);
#endif
-#endif //WIN32
i++;
}
else
@@ -412,7 +401,7 @@ int main(int argc, char** argv)
}
else
{
- SYS_WriteCommandLineInt(syshandle, argv[i++], 1);
+// SYS_WriteCommandLineInt(syshandle, argv[i++], 1);
}
}
}
@@ -533,13 +522,16 @@ int main(int argc, char** argv)
printf("error: window size too small.\n");
}
- if (error)
+ if (error || argc == 1)
{
usage(argv[0]);
+ return 0;
}
- else
+
+ if (!stereoParFound) stereomode = RAS_IRasterizer::RAS_STEREO_NOSTEREO;
+
#ifdef WIN32
- if (scr_saver_mode != SCREEN_SAVER_MODE_CONFIGURATION)
+ if (scr_saver_mode != SCREEN_SAVER_MODE_CONFIGURATION)
#endif
{
#ifdef __APPLE__
@@ -547,6 +539,7 @@ int main(int argc, char** argv)
SYS_WriteCommandLineInt(syshandle, "nomipmap", 1);
//fullScreen = false; // Can't use full screen
#endif
+
if (SYS_GetCommandLineInt(syshandle, "nomipmap", 0))
{
GPC_PolygonMaterial::SetMipMappingEnabled(0);
@@ -768,7 +761,7 @@ int main(int argc, char** argv)
printf("error: couldn't create a system.\n");
}
}
-
+
return error ? -1 : 0;
}