Re: [AD] Mouse cusor documentation

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


On Sunday 03 October 2004 15:08, Elias Pschernig wrote:
> Why do you have to call show_mouse() for the gfx_capabilities flag to
> get updated?

Because gfx_capabilities is only updated after show_mouse() has been 
called. You don't know if you have a hardware cursor or not until after 
show_mouse() has been called. It's always been this way.
Also, note that you can't check for the precense of relevant entries in teh 
vtable to set gfx_capabilities once and for all: in Windows, you will only 
be able to get a hardware cursor for cursors upto 32x32 pixels, not above. 
So setting it always is unreliable.

> After all, you could already have called show_mouse()
> before.

After having called show_mouse, gfx_capbilities reflects wether or not a 
hardware mouse cursor is in use right now.

> And I still think "show_mouse(my_bitmap)" should always disable the
> hardware cursor, else we break old programs.

No, we don't. Allegro uses a software cursor automatically if it can't let 
the OS draw the cursor. No need to disable the hardware cursor for that.

> Only show_mouse(screen)
> might allow it - but I'd prefer the API pointed out in that other
> thread, where only enable_hardware_cursor() can show the hardware
> cursor, and show_mouse() always draws a software cursor.

I'm not sure... I think this could be considered an API breakage. Anyway, 
with the new system and custom cursors, the code needs to be somewhat 
rethought anyway.

> (This isn't relevant for 4.1.16 - maybe just add a note that the
> hardware cursor functions aren't finalized yet and likely to change in
> 4.1.17).

I don't think this will (should) affect how things work now: for custom 
cursors, I don't think there is a real difference in behavior between 
4.1.16 and 4.1.17.

Evert





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