[AD] Patch to prototype _xwin_handle_input

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


Hi,

AFAICS `_xwin_handle_input' is not currently prototyped anywhere,
and I need to call it after `ENABLE()' in AllegroGL since I have
to keep interrupts disabled for the entire rendering process (a
significant portion of most games' time), which has very bad
effects on input devices.  This patch adds a prototype to
`allegro/aintunix.h'.

I'm not sure that it's good to have the interrupts disabled for
so long, and thought about an alternate system, where the user
sets a flag or increases a variable to show that they are doing
X calls and don't want Allegro to do any in its timer handler.
It's just a variable being tested before `_xwin_handle_input' is
called in `xwin.c'.  I haven't made a patch for it though,
because I don't know whether disabling the interrupts like this
really is such a bad thing to do -- the only effect is on the
actual Allegro timer system, which will miss a lot of
interrupts, but it should catch up again later on.  If there's
no problem here, it's probably not worth changing.

Back on the topic of the attached patch, is there any plan to go
through `xwin.c' and prototype all the public routines there?  I
don't need many of them, but I seem to keep sending patches to
make them visible one by one.  Should I just make a big patch
prototyping all of them?  I don't think I understand enough of X
to decide what sort of things people will want access to,
though.

George

diff -urN allegro-3.9.30-1/include/allegro/aintunix.h allegro-3.9.30-2/include/allegro/aintunix.h
--- allegro-3.9.30-1/include/allegro/aintunix.h	Mon Dec 20 00:39:28 1999
+++ allegro-3.9.30-2/include/allegro/aintunix.h	Thu Jan 20 16:51:13 2000
@@ -63,6 +63,8 @@
    AL_ARRAY(_DRIVER_INFO, _xwin_keyboard_driver_list);
    AL_ARRAY(_DRIVER_INFO, _xwin_mouse_driver_list);
    AL_ARRAY(_DRIVER_INFO, _xwin_timer_driver_list);
+
+   AL_FUNC(void, _xwin_handle_input, (void));
 #endif
 
 


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