On Wed, 28 Nov 2001 [EMAIL PROTECTED] wrote: > Well, now many people have kernel 2.4, and I'm thinking of giving the > above plan a shot.
> Anyone know what the the ____________ is? input-linux-mouse? GII can be used this way on any input that can be opened multiple times -- if it cannot then X has the input handle and so GII cannot use it (unless X is not told about the device, e.g. a second keyboard or mouse.) Right now I think this limits it to the /dev/event input -- X can be told to use /dev/input/* while GII uses the raw /dev/event handle. Events appear on both of these handles, and the /dev/event handle gets events from all of the devices while the /dev/input handles get events from only one device. input-linux-evdev should work with USB mice/keyboards and with joysticks. It will also work with ps2 mice/keyboards if you apply the input-ps2 project's patch to the latest 2.4 series kernels. That's available at http://www.transvirtual.com/~jsimmons/input-ps2.diff but may require some minor Makefile massaging to get compiling. For serial mice, you'd have to run the full linux-console "ruby" version of the kernel. I would say your best bet is to just get it working with the above two simpler scenarios and wait for ruby to be merged with the 2.5 series kernels. Ruby also has a whole slew of improved drivers for many joysticks. If you're interested in better input drivers, I would track the 2.5 kernel series since those drivers will probably be appearing pretty soon. > Any kernel parameters that have to be compiled in? Enable the input subsystem and the input drivers. Most of those drivers are CONFIG_INPUT_something. If using the input-ps2 patch, don't try to build the "serial line discipline", as it is missing peices. > Can I call something like select on a GII input and a regular unix > file descriptor? >From the giiEventSelect(3gii) manpage: giiEventSelect is the combination of giiEventPoll and select(2) allowing to wait for both LibGII events and arbitrary file descriptors in any of the three states. However, this function is not available if the operating system does not support the select(2) call, not even as a stub. > Any other comments? They won't concern you unless you want to give full textual device descriptions to the end users, but the linux-input-evdev driver has a few shortcomings... they are listed in the LibGII TODO in the CVS copy of the source if you are interested in working on them. In general, I imagine there is a lot of functionality which game writers need to implement over and over (things like joystick or mouse sensitivity curving). If you find you are toting around a library of functions for your own use which you do not find in LibGII, consider making them into a LibGII filter which we can add to the source for everyone to use. They don't have to be especially generic to be a desireable filter. P.S. another, more tacky, trick would be to write a little GII daemon that opens a bunch of inputs and repeats them, and make the X server use repeated events from FIFOs that this program owns, a-la /dev/gpmdata. However that would add a layer of userspace context and require a bit of work and would also require that the "giid" be started before the X server and the X server reconfigured, which is probably more than most users would be willing to bear. -- Brian
