Fwd: Re: [AD] window resizing

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Peter Wang wrote:
> I think SCREEN_W and SCREEN_H would need to be
> deprecated with the 
> callback-based design, otherwise you would get
> inconsistent results in 
> the following case:
> 
>     int w = SCREEN_W;
>     /* context switch here; window resized */
>     int h = SCREEN_H;
> 
> You'd probably need a function like
> get_screen_dimensions(int *width, 
> int *height), which would lock out the resize
> operation for its 
> duration.  Even so, that the resize can change the
> screen variable *at 
> any time* makes me uncomfortable.
IMO it would be better to leave this up to the user. 
The user can supply their own checks for when they
resize the window, and if they're doing this in a
seperate thread, they better be supplying checks.  If
they aren't its really their own fault.  I don't think
its really a big enough issue to be changing the API
around.

I donno, I guess I just don't like the idea of
changing part of the API that doesn't paticularly need
to be changed.  You could replace the macros with
seperate function calls maybe?  That would solve some
of the issue...

I also think that the case where a game would want
window resizing is more rare then it is common, and
that the common usage of allegro probably shouldn't be
hindered and / or rewritten to accomodate features it
isn't using.

Maybe I just don't like change that much... ;]

Dustin D.




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/