Re: [AD] Mouse cusor documentation

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


Elias Pschernig wrote:
Hm, so you could do:
enable_hardware_mouse();
show_mouse(NULL);
if(gfx_capabilities & GFX_HW_MOUSE)
   // hardware mouse is possible

Actually, all you'd have to do is enable_hardware_mouse(), then check the flag. show_mouse(NULL) is the default, so unless you were already showing a mouse pointer, you wouldn't have to call it again.

A function like check_hardware_mouse() would look cleaner. Or, maybe we
can instead add a function show_hardware_mouse - which would take care
of the check function, and also do what the show_hardware_cursor I was
talking about previously would do:

But that way I suggested wouldn't show the mouse pointer.. that's the whole reason for it. So you can just test and not have to show the mouse yet.

Can be
useful if you don't need Allegro's software cursor - but would still
want to use a hardware cursor in case it is available."

I can't help to wonder under what circumstances this would be desirable. If you want a mouse and a hardware mouse is unavailable, wouldn't you want a software mouse?

If you have e.g. a mouse
drawing routine which draws flicker free above a playing animation,
which Allegro's software mouse can't do. But a HW mouse still would be
ok.)

If the animation is that big that the mouse would be flickering a lot, I would think it'd be best to just disable the pointer outrighr. Nothing worse than trying to watch a video and being unable to hide the mouse. (And as long as the animation is <= 30FPS, you can vsync and hide/blit anim/show with no flickering (as long as the system is fast enoung), with no real percievable animation jitter. scare_mouse_area is your friend. ;)

- Kitty Cat




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