[Ohrrpgce] SVN: jay/3256 New backend interfaces, updated. Added GFX_PREFERENCES as a preference s
Mike Caron
caron.mike at gmail.com
Wed Dec 30 10:24:13 PST 2009
Just out of curiosity, what's wrong with something like:
GetPrefInt(name as string, optional section as string = "default") as integer
Etc.
--
Mike Caron
-----Original Message-----
From: Ralph Versteegen <teeemcee at gmail.com>
Date: Thu, 31 Dec 2009 07:11:41
To: <ohrrpgce at lists.motherhamster.org>
Subject: Re: [Ohrrpgce] SVN: jay/3256 New backend interfaces,
updated. Added GFX_PREFERENCES as a preference s
2009/12/29 <subversion at hamsterrepublic.com>:
> jay
> 2009-12-28 16:02:34 -0800 (Mon, 28 Dec 2009)
> 146
> New backend interfaces, updated. Added GFX_PREFERENCES as a preference structure. Added interfaces: gfx_SetPreferences() and gfx_GetPreferences().
> ---
> U wip/gfx.new.h
>_______________________________________________
> Ohrrpgce mailing list
> ohrrpgce at lists.motherhamster.org
> http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
>
Wait, I don't think that this is a good idea. The more complicated
idea of a list of key-value pairs is much more flexible. Most of the
things that you've put in GFX_PREFERENCES are gfx_directx specific,
and you've left out things from other backends, like zoom. And it's
clearly beneficial to be able to add a new option to a backend without
having to update all the backends.
Using key-values pairs doesn't mean having to use gfx_setoption or
similar. We could modify gfx_Get/SetPreferences to work on an actual
list.
Also (in response to the next commit), yes, parsing command line
options and reading preferences is very similar, and the intention was
to read preferences and then pass them to the backend with
gfx_setoption, but if gfx_setoption is removed, we would still need
some way to figure out which commandline options should be sent to/are
parsed by the backend. What's the plan if you remove gfx_setoption, to
hardcode a list of options for the graphics backend? I've been
thinking that we should go down this route anyway, though it seems
undesirable.
_______________________________________________
Ohrrpgce mailing list
ohrrpgce at lists.motherhamster.org
http://lists.motherhamster.org/listinfo.cgi/ohrrpgce-motherhamster.org
More information about the Ohrrpgce
mailing list