Am Sonntag, 18. März 2007 schrieb Dennis Schridde:
> Am Sonntag, 18. März 2007 schrieb [EMAIL PROTECTED]:
> > On Sat, 17 Mar 2007 18:05:38 -0400 Dennis Schridde
> >
> > <[EMAIL PROTECTED]> wrote:
> > >Am Samstag, 17. März 2007 schrieb Dennis Schridde:
> > >> Am Samstag, 17. März 2007 schrieb [EMAIL PROTECTED]:
> > >> > Here is patch.  Works on windows.  Going to reset to linux to
> > >
> > >test.
> > >
> > >> >  Should work now for both.
> > >> >
> > >> > I added  resetConfig() routine, but I am not sure of default
> > >
> > >case
> > >
> > >> > should be?
> > >>
> > >> I wonder how this patch can fix the problem...
> > >>
> > >> main() calls loadConfig() which calls openWarzoneKey() which
> > >
> > >calls
> > >
> > >> registry_load() if that was not done before. The return value of
> > >> registry_load() is discarded. After that loadConfig proceeds
> > >
> > >with
> > >
> > >> initializing game with the values from the config file or the
> > >
> > >default
> > >
> > >> values. At the end it calls closeWarzoneKey() which calls
> > >
> > >registry_save()
> > >
> > >> So actually it should not depend on the config file being
> > >
> > >present and
> > >
> > >> create it when it doesn't exist...
> > >
> > >Just tested it here again. It does create the config file... No
> > >crashes, no
> > >empty files... Just a confused /dev/urandom...
> >
> > It does a few loadConfig() calls.  It still does create a 0 length
> > filename, but then the routine that checks for this error had no
> > code to fix problem.
> > I added that code, so 2 cases are fixed, 0 length file or file not
> > found.
> > I have not chance to look at how old code was done in 2.0.2.3 and
> > before on berlios.  Maybe routine got dropped someplace?
> >
> > Other way to check would be to init everything on game start, then
> > only change when loadConfig() is call.  That work also.
>
> Well, loadConfig should do the initialization...
> And for loadConfig it should *NOT* matter whether the config file was found
> or not... Even if it is of size 0, it should still init correctly. And it
> does so here.
> What version of PhysFS are you using?
>
> --Dennis


Attachment: pgp7yNxsXo21m.pgp
Description: PGP signature

_______________________________________________
Warzone-dev mailing list
Warzone-dev@gna.org
https://mail.gna.org/listinfo/warzone-dev

Reply via email to