[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
On Fri, 2004-07-02 at 18:25 +0200, Evert Glebbeek wrote:
> On Friday 02 July 2004 13:22, Henrik Stokseth wrote:
> > There was. :-) I've put my pending patches on the SF tracker.
> >
> > https://sourceforge.net/
> tracker/?func=detail&aid=983987&group_id=5665&atid=305665
> > https://sourceforge.net/
> tracker/?func=detail&aid=983985&group_id=5665&atid=305665
> >
> > Both are sufficiently tested. It can be committed to development branch
> > right away but needs to be reviewed for API/ABI issues before it can be
> put
> > in a stable branch.
>
> Applied to mainline. I'm not sure how to check for ABI compatibility
> though... API-wise, things look ok.
>
No functions of the public API nor any structs were modified, so it is
also ABI compatible. I think you can just apply it to branch as well. Or
am I missing something?
> What about the third patch on the tracker? The description is
>
> > poll_joy() should read all events
> >
> >
> > In src/linux/ljoy.c, the poll_joy() routine reads a
> > single event
> > when called, leaving maybe 60 events or so in the kernel
> > driver's queue, still to be read. The result is a long
> > lag after
> > the stick is released before the calling program can
> > tell that
> > the stick is at (0,0), when joy_poll() is called once
> > per video
> > frame. The attached patch makes joy_poll() read all
> > available events.
>
> I'm personally undecided on wether this is a good thing or not. Any
> thoughts?
>
Well, Eric said this:
> > http://www.allegro.cc/forums/view_thread.php?_id=354745&
>
> I suppose this is patch #943753 on SF's tracker. I've attached it.
>
> Peter, do you have an opinion on the patch? I remember that you > didn't like
> a patch that would have made the same change (read all events) to the > Xlib
> event loop.
So I guess, nobody really knows how bad it is.
> while (read(joy_fd[i], &e, sizeof(struct js_event)) == sizeof(struct js_event))
The above means, if the joystick sends too much data - it will just hang
the Allegro program. OTOH, if the program is too slow to receive all
joystick input - there's a problem anyway. I don't have a joystick
myself to test it, and at least someone finds the new behavior better -
so I'd vote for applying it, and then see if linux programs start
behaving bad with joystick enabled.
--
Elias Pschernig