Re: [AD] SVGAlib driver

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


On Wed, Nov 17, 1999 at 06:55:36PM +1100, Peter Wang wrote:
> George Foot <george.foot@xxxxxxxxxx> wrote:
> > On Tue, Nov 16, 1999 at 05:13:55PM +1100, Peter Wang wrote:
> > > > > Bug: Pressing either '2' or 'Enter' will cause SVGAlib to exit.  I am
> > > > > not sure why yet (something to do with signals).
> 
> Looking in the SVGAlib src I found:
> 
> 	int __svgalib_nosigint = 0;
> 	/* Don't generate SIGINT in graphics mode */
> 
> So that little problem is solved.  Finally!

Right, that makes sense -- it's the opposite of what I
suggested. :)  In this case, it looks like when we change the
keyboard mode it upsets SVGAlib's keyboard handler, in which
case the codes produced by `2' and `Enter' look like the codes
it expects to see from `Ctrl-C' or something.

> Theoretically there *ought* to be clashes, as SVGAlib is also using
> SIGUSR1 and SIGUSR2 for console switching (the same signals).  It
> seems to work without problems, except that SVGAlib is taking control
> of the switching, so `set_display_switch_mode' et al. have no effect.
> This might need to be fixed, if anyone can be bothered.  The SVGAlib
> driver is ``secondary'' anyway, so probably not. :)

It might be best to force SWITCH_PAUSE or whatever is most
appropriate for SVGAlib, like the Windows version forcing
SWITCH_AMNESIA.  Then we can ignore our console switching system
-- just turn it off in SVGAlib modes.  We won't always be able
to turn it back on afterwards, because we might lack the
privileges.  OTOH we can do something fancy while we have the
privileges in order to be able to reinstate our switching
system.  I don't think this matters much anyway though, because
most programs don't switch between drivers anyway.

Also, we may not be able to call callbacks any more if we're
leaving the switching up to SVGAlib.

George



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