[Scummvm-devel] PORTERS: New OSystem API for loading/storing default config file

Max Horn max at quendi.de
Tue Jul 29 20:52:18 CEST 2008


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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: osystem-configfile.patch
Type: application/octet-stream
Size: 19865 bytes
Desc: not available
URL: <http://lists.scummvm.org/pipermail/scummvm-devel/attachments/20080729/740fcd26/attachment.obj>


More information about the Scummvm-devel mailing list