[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [11091] trunk/blender/source/gameengine/ GamePlayer/ghost/GPG_ghost.cpp: This is a fix for game engine bug #6667
Kent Mein
mein at cs.umn.edu
Wed Jun 27 17:08:32 CEST 2007
Revision: 11091
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11091
Author: sirdude
Date: 2007-06-27 17:08:31 +0200 (Wed, 27 Jun 2007)
Log Message:
-----------
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
Modified Paths:
--------------
trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
Modified: trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
===================================================================
--- trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp 2007-06-27 14:23:35 UTC (rev 11090)
+++ trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp 2007-06-27 15:08:31 UTC (rev 11091)
@@ -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 @@
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 @@
GHOST_TUns32 fullScreenHeight= 0;
int fullScreenBpp = 32;
int fullScreenFrequency = 60;
-
+
#ifdef __linux__
#ifdef __alpha__
signal (SIGFPE, SIG_IGN);
@@ -334,13 +330,10 @@
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 @@
;)
{
-#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 @@
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 @@
}
else
{
- SYS_WriteCommandLineInt(syshandle, argv[i++], 1);
+// SYS_WriteCommandLineInt(syshandle, argv[i++], 1);
}
}
}
@@ -533,13 +522,16 @@
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 @@
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 @@
printf("error: couldn't create a system.\n");
}
}
-
+
return error ? -1 : 0;
}
More information about the Bf-blender-cvs
mailing list