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:
authorDalai Felinto <dfelinto@gmail.com>2010-09-13 08:52:20 +0400
committerDalai Felinto <dfelinto@gmail.com>2010-09-13 08:52:20 +0400
commit9153e82d210fbe47fc2ede39369e87c45445470f (patch)
treeeeab0202ac46cb0c66b04d18d9559bb1e7f11628 /source/gameengine/GamePlayer
parent7c9bf53bf17c76ddb1ce1060e2b6e886ba288baa (diff)
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
Diffstat (limited to 'source/gameengine/GamePlayer')
-rw-r--r--source/gameengine/GamePlayer/ghost/GPG_ghost.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
index 9cdee2a340c..5981855b6f7 100644
--- a/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
+++ b/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp
@@ -479,14 +479,14 @@ int main(int argc, char** argv)
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 @@ int main(int argc, char** argv)
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++]);