[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:59:12 CEST 2010


Actually bug introduced on revision: 19146 (feb 2008).
Benoit, I'm pretty confident of the fix. If the original code is the "right
one" then we need to edit the console message (since the behaviour was buggy
for sure). Let me know otherwise...

Cheers,
Dalai


2010/9/12 Dalai Felinto <dfelinto at gmail.com>

> 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++]);
>
>
> _______________________________________________
> Bf-blender-cvs mailing list
> Bf-blender-cvs at blender.org
> http://lists.blender.org/mailman/listinfo/bf-blender-cvs
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-blender-cvs/attachments/20100912/d050bfbc/attachment.html>


More information about the Bf-blender-cvs mailing list