[Scummvm-devel] PORTERS: New OSystem API for loading/storing default config file
Oystein Eftevaag
wintermute at geheb.com
Wed Jul 30 19:14:01 CEST 2008
I definately agree with this approach.
The iPhone port is one of the #ifdef culprits (calling into the backend
to return a path), something like this would be much nicer.
One (more or less) related suggestion though, for future consideration:
What about support for multiple config files? Mainly for providing the
possibility for additional config files containing individual game
targets (to be installed by packages of the various free games we
support). It would introduce a bit more complexity with regards to
saving the config again later, but should be manageable.
I'm sure this has been discussed already and I've missed it, just
thought I'd throw it out there while the topic was up :)
--
Oystein
Max Horn wrote:
> Hi everybody,
>
> based on the "File handling" thread, I think it would be a good idea
> to add two new OSystem methods for accessing the *default* confg file:
>
> virtual Common::SeekableReadStream *openConfigFileForReading();
> virtual Common::WriteStream *openConfigFileForWriting();
>
> (the latter method may return 0 to indicate that writing to the
> default config file is not possible).
>
> The attached patch does just that. Initially, this change should not
> have any impact on anybody (besides the usual regressions caused by my
> coding mistakes ;) . However, this should enable us to gradually get
> rid of the #ifdef mess and other evil tricks we currently use to load
> the default config file from the correct location. E.g. the PS2 & PSP
> hacks using fake paths could be removed.
>
> I am interested in comments on this patch. Right now I am tempted to
> just commit it as-is, it just feels the "right" way to approach
> things. But I figure it's best to wait a bit to hear whether there is
> loud criticism or *gasp* even alternate proposals.
>
> Cheers,
> Max
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> 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=/
> ------------------------------------------------------------------------
>
> _______________________________________________
> Scummvm-devel mailing list
> Scummvm-devel at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scummvm-devel
More information about the Scummvm-devel
mailing list