[Scummvm-devel] Features and graphics modes

Max Horn max at quendi.de
Sat Mar 13 09:43:04 CET 2004


Am 13.03.2004 um 17:20 schrieb Marcus Comstedt:

>
> Max Horn <max at quendi.de> writes:
>
>> That's kind of abuse, though, and not better than the current abuse -
>> for example, in the SDL backend the scalers are "logically" sorted, I
>> wouldn't want to change that just so we can save 5 lines of code :-)
>
> We aren't talking about saving lines of code.  We are talking about
> avoiding making assumptions on mode names when there is an API to
> abstract them.
>
Well, the "default" scaler name is a special purpose name. It's not 
necessarily the case that the backend actually supports a scaler with 
that name. The SDL backend, for example, doesn't.

The way this is currently done is bad because it is based on the 
assumption that "2x" is the default scaler. However, the alternative 
you suggest is likewise bad, because it is based on the assumption that 
the first listed scaler is the default scaler.

Hence my suggestion to define a scaler *mode* (not name) which simply 
tells the backend to switch to whatever it considers "default". Yet 
another alternative would be to add a method getDefaultGraphicsMode() 
to the backends. Both mean adding to the OSystem API, but both also 
work w/o any additional assumptions about the backend and its graphics 
modes.



Cheers,

Max





More information about the Scummvm-devel mailing list