Re: [AD] Two custom mouse cursor patches

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


I had a look at the patch, but I haven't tried it yet. My comments:
What happens if you destroy the current cursor? I have a feeling that
NSCursor set retains the cursor (in which case it would be fine) but
I'm not sure.
In this line:
cursor = _AL_MALLOC(sizeof cursor);
shouldn't it be sizeof(*cursor)?
The bit about "Before MacOS X 10.3..." I think we could maybe drop
support for 10.2 as I don't think many people still use it
I confess that NSImageFromAllegroBitmap isn't right because
NSBitmapImageRep uses premultiplied alpha and allegro doesn't.
The other question is whether this code should go in osxgl or qzmouse:
in principle it doesn't depend on GL so if we were to have a different
graphics driver the same code would be needed.

Pete



On Mon, Sep 15, 2008 at 2:54 AM, Evert Glebbeek <eglebbk@xxxxxxxxxx> wrote:
> Attached are two patches related to custom mouse cursors. I would like some
> feedback before commiting them (and the code can use a bit of polish as well
> as comments too).
>
> The first adds support for custom mouse cursors as well as system cursors to
> OpenGL/MacOS X, at least for windowed mode (I haven't tested if the same
> setup would work in fullscreen mode too).
> I implemented this in src/macosx/osxgl.m, at first without realising that
> Peter Hull had already done part of the work in src/macosx/qzmouse.m. It
> probably belongs more properly in qzmouse.m, although this way the display
> driver vtable can be set up without needing to make the functions global. I
> can change this anyway as part of the cleanup if desired. Much of this code
> was actually almost directly copied from Allegro 4.2's code base.
> Peter: how does this code look to you? Any traps I might have fallen into
> with this? Other comments?
>
> The second patch adds text to ex_mouse_cursor explaining how to use the
> program. It uses TTF fonts at the moment because those seem to be the only
> ones that work on MacOS X at the moment. Let me know if it's ok and I'll
> commit it.
>
> Evert
>
>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great
> prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> --
> https://lists.sourceforge.net/lists/listinfo/alleg-developers
>




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