Re: Gamepads

看板FB_chat作者時間18年前 (2008/04/02 06:28), 編輯推噓0(000)
留言0則, 0人參與, 最新討論串4/4 (看更多)
On Tue, 1 Apr 2008 16:30:12 -0500 "Zane C.B." <v.velox@vvelox.net> wrote: > On Tue, 01 Apr 2008 01:17:19 +0200 > Raven <raven@apriliaforum.net> wrote: > > > This is old news, but I searched like mad, and couldn't find > > anything on the web. > > Maybe some of you once have the same problem. > > I wanted to play a game under Wine, but it was nearly unplayable > > with the keyb controls. > > So I plugged in an USB gamepad . . . it didn't work. > > Time to hit the wonderful world of Google . . . > > As always, the combination of Wine + "Insert_topic_here" yielded > > nothing but "Linux - mainly Ubuntu" stuff. > > There are enough threads, but none that helps. > > Seems like Linux has /dev/input/js, I wonder if this is > > neccessary . . . The Wine wiki mentions a DirectInput registry > > key . . . Linux only. > > > > We have USB keyboards and mice, we should have a gamepad, me > > thinks . . . > > > > Lemme see, > > $ cat /dev/uhid1 . . nothing > > $ cat /dev/uhid2 . . there it is ! > > Me presses buttons, jerks sticks - terminal responds with weird > > output. Good ! > > Uh-huh, what about the joystick driver in ../xorg/modules/input ? > > > > $ man joystick > > There - everything is documented in all it's glory. > > > > $ sudo vi /etc/X11/xorg.conf > > > > :snip > > > > Section "ServerLayout" > > .. > > InputDevice "Gamepad" > > .. > > .. > > Section "InputDevice" > > Identifier "Gamepad" > > Driver "joystick" > > Option "Device" "/dev/uhid2" > > Option "Buttons" "16" > > Option "many_more" > > EndSection > > > > :snap > > > > Guess what - it worked. > > > > Tons of useless threads in hundreds of Linux forums, and all you > > need is a single manpage. > > Go figure . . > > Sweet. > > Did not know this was usable for UHIDs. Now the big question is how > to wrap the events around to stuff usable by ZSNES. After a little bit of investigation, I found it is possible of remapping the buttons and axis to various arbitrary keycodes, but this seems to crash X as of currently. _______________________________________________ freebsd-chat@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-chat To unsubscribe, send any mail to "freebsd-chat-unsubscribe@freebsd.org"
文章代碼(AID): #17yhSB00 (FB_chat)
文章代碼(AID): #17yhSB00 (FB_chat)