Re: [AD] Using system mouse cursor

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


Evert Glebbeek wrote:
On Sunday 03 October 2004 00:43, Chris wrote:

If Allegro can't set a system cursor, no it shouldn't switch back to a software cursor. It should switch to a custom hardware cursor, using Allegro's default cursors.

Not all drivers support hardware cursors - and most drivers that do also support system cursors.

If a driver doesn't support hardware cursors, enable_hardware_cursor would fail. And if the driver doesn't support hardware cursors, it also won't support system cursors.

So switching to a custom cursor when there is no system cursor isn't that useful if it should only be done for hardware cursors IMO.

I think it'd be better to think in terms that you can't (through the API) explicitly set a system cursor. You can set a default cursor (by using NULL) which the mouse driver will then decide to try a system cursor or Allegro's default in hardware.

The user decides if he wants a system or a custom cursor.

The user should only decide if he wants a custom or "default" cursor. Allegro will decide to use a system cursor or the built-in default cursor if it's not custom.

The latter part is what can't be guarenteed (hardware cursors aren't supported by all drivers).

If hardware cursors aren't supported, neither should system cursors. We can only use system cursors because we're using the system to get hardware cursors.

- Kitty Cat




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