Re: [AD] mouse cursor update

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


On Fri, August 22, 2008 9:01 am, Peter Wang said:
> Turns out we *need* to call SetCursor() every single time we get a
> WM_SETCURSOR message, and I had commented that out.
>
> In window_callback we know the active display, but we need to get
> the
> cursor for that display, for SetCursor.  But the display could be a
> ALLEGRO_DISPLAY_D3D or a ALLEGRO_DISPLAY_WGL, so I think we need to
> move
> at least the mouse cursor-related fields into a superclass, say
> ALLEGRO_DISPLAY_WIN.

I made the following changes:

- created a ALLEGRO_OGL_EXTRAS struct that holds all the common
stuff needed by the OGL drivers.
- Put a ogl_extas pointer in ALLEGRO_DISPLAY.
- Removed ALLEGRO_DISPLAY_OGL
- Updated src/opengl/* to use ogl_extras instead of the
ALLEGRO_DISPLAY_OGL struct
- Modified WGL to use ogl_extras
- Re-added the SetCursor call

It works in D3D. What needs to be done is update the Linux XGLX and
MacOS OpenGL drivers to use ogl_extras. I can do Linux if elias
wants.

Trent :{)>




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