Re: [AD] END_OF_MAIN removal patch for msvc |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On November 17, 2008, Peter Wang wrote:
> On 2008-11-17, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> > On November 17, 2008, Evert Glebbeek wrote:
> > > On 17 Nov 2008, at 08:35, Peter Wang wrote:
> > > > What functions in 4.9 still need to magically know the values of
> > > > argc, argv? If there are any, they should be designed out.
> > >
> > > As far as I know, the only reason to grab argv[] was to get the
> > > executable path. Now that we have a better filesystem implementation,
> > > I don't think this is very useful/needed anymore - shouldn't be anyway.
> >
> > Not to mention the reason for it previously was to find resources that
> > live in the same dir as the exe, and that tends to only be common (and
> > legal) in Win9x and maybe XP, but there are other ways to get the "right"
> > dirs for resources and stuff.
>
> I guess it might still be useful for the example programs to find their
> data. We could add a function to be called after al_init():
>
> void al_set_argcv(int argc, const char *argv[]);
I was thinking of something similar a ways back, and adding a
al_set_program_name(char *name); like function, so al_get_path can prebuild a
few of the paths for the user (its how Qt's works in fact).
> Peter
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's
> challenge Build the coolest Linux based applications with Moblin SDK & win
> great prizes Grand prize is a trip for two to an Open Source event anywhere
> in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/
--
Thomas Fjellstrom
tfjellstrom@xxxxxxxxxx