[SDL] API for window positionning (was: moving screen when u change resolution)

Bob Pendleton bob at pendleton.com
Mon Jan 31 13:24:19 PST 2005

On Mon, 2005-01-31 at 17:33 +0100, Olivier Fabre wrote:
> On 31/01/2005, Bob Pendleton, you wrote:
> >> Anyway, ++votes for SDL_VIDEO_CENTERED as a flag to 
> >> SDL_SetVideoMode().
> > Yes, I'll vote for that... But, you have to make sure that it doesn't
> > change the current behavior in anyway. 
> Well, the behaviour was already changed between 1.2.6 were the window
> was always centered, and 1.2.7 where it wasn't (which is one of the
> reasons why I stayed with 1.2.6 for my Win32 build.)
> I would also prefer a way to set the window position in the API instead
> of using an envvar (which makes no sense IMHO).
> > If we keep adding flags we will need to move to a 64 bit int some day
> > or change to a vector based flag passing technique, which I don't like
> > at all.
> If I was responsible for this, I'd use varargs... (possibly introducing
> a new "SDL_SetVideoModeVarargs()" function in order not to break source
> compatibility.)

Good idea, makes thing easy for the user. But, what about the internals
of SDL? Inside SDL there is a LOT of code that believes that the flags
are stored as bits in a word. Internally the options are to either
switch to a 64 bit int or, at some point, switch to a vector based
system. That is true whether or not the user interface is based on
varargs or on bit masks. 

I wouldn't want to be the guy who had to change all the flags related
code to use a vector representation :-)

		Bob Pendleton


More information about the SDL mailing list