[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [31900] trunk/blender/source/gameengine/ GamePlayer/ghost/GPG_ghost.cpp: blenderplayer commandline argument fixes ( for -f and -w)
Dalai Felinto
dfelinto at gmail.com
Mon Sep 13 06:52:20 CEST 2010
Revision: 31900
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=31900
Author: dfelinto
Date: 2010-09-13 06:52:20 +0200 (Mon, 13 Sep 2010)
Log Message:
-----------
blenderplayer commandline argument fixes (for -f and -w)
argc always include the filename, therefore all the optional parameters should check for < argc instead of <=argc.
E.g. That was causing "blenderplayer -f 800 600 myfile.blend" to play in a wrong Bpp (since it was trying to parse the filename to fullScreenBpp).
Bug introduced on rev. 16448 (in 2.49) and merged to 2.5 in rev. 19323
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 2010-09-13 02:35:59 UTC (rev 31899)
+++ trunk/blender/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp 2010-09-13 04:52:20 UTC (rev 31900)
@@ -479,14 +479,14 @@
i++;
fullScreen = true;
fullScreenParFound = true;
- if ((i + 2) <= argc && argv[i][0] != '-' && argv[i+1][0] != '-')
+ if ((i + 2) < argc && argv[i][0] != '-' && argv[i+1][0] != '-')
{
fullScreenWidth = atoi(argv[i++]);
fullScreenHeight = atoi(argv[i++]);
- if ((i + 1) <= argc && argv[i][0] != '-')
+ if ((i + 1) < argc && argv[i][0] != '-')
{
fullScreenBpp = atoi(argv[i++]);
- if ((i + 1) <= argc && argv[i][0] != '-')
+ if ((i + 1) < argc && argv[i][0] != '-')
fullScreenFrequency = atoi(argv[i++]);
}
}
@@ -497,11 +497,11 @@
fullScreen = false;
windowParFound = true;
- if ((i + 2) <= argc && argv[i][0] != '-' && argv[i+1][0] != '-')
+ if ((i + 2) < argc && argv[i][0] != '-' && argv[i+1][0] != '-')
{
windowWidth = atoi(argv[i++]);
windowHeight = atoi(argv[i++]);
- if ((i +2) <= argc && argv[i][0] != '-' && argv[i+1][0] != '-')
+ if ((i + 2) < argc && argv[i][0] != '-' && argv[i+1][0] != '-')
{
windowLeft = atoi(argv[i++]);
windowTop = atoi(argv[i++]);
More information about the Bf-blender-cvs
mailing list