Re: [AD] Mouse cusor documentation

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


On Monday 04 October 2004 01:58, Chris wrote:
> Actually it does, just not as badly as X. In X you'll lose mickeys after 
> leaving/hitting the edge of the program. In Windows you'll lose mickeys 
> when hitting the edge of the desktop.

This is the current behavior anyway even when you use a software cursor. I 
should have said, using a hardware cursor in Windows doesn't change mickey 
behavior compared to using the software cursor, unlike X.

> This looks perfect to me. Although I would like to request if you could 
> make gfx_capabilities & GFX_HW_MOUSE (or whatever it is) be true if the 
> mouse is shown on a NULL bitmap and the driver supports the current 
> pointer.. this way you don't have to display the pointer if you want to 
> find out if the current mouse pointer will work.

Doesn't sound like a bad idea; although I'd have to check if it really 
doesn't break anything. Technically, show_mouse() could still fail to 
display a hardware cursor even if the bitmap was succesfully created. In 
practice, I don't think it ever does though.

> One thing I noticed though is that you use is_same_bitmap 
> (_mouse_screen, screen) to test if the mouse pointer is on the screen or 
> not. This won't work very good on platforms where 
> ALLEGRO_VRAM_SINGLE_SURFACE is defined, since _mouse_screen could be 
> pointing to any video bitmap. I think it'd be better to just test if 
> _mouse_screen == screen.

The reason I did this is because the mouse might be displayed on a 
subbitmap of the screen. I do think Allegro previously always used screen 
to compare to though. I'm not sure if the docs are 100% unambigous on this 
point. Anyway, thinking about it, it doesn't make much sense to display 
the mouse on a subbitmap of screen only. The only reason to do that is to 
restrict mouse movement, I think, and for that set_mouse_range() would be 
the appropriate function.
I'll make the change and see what the docs say about it.

Evert





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