OpenBSD Journal

ujoy(4) added to -current

Contributed by rueda on from the the-joy-of-openbsd dept.

With the following commit, Thomas Frohwein (thfr@) added a joystick/gamecontroller driver to -current:

CVSROOT:	/cvs
Module name:	src
Changes by:	thfr@cvs.openbsd.org	2021/01/22 22:08:36

Modified files:
	etc            : MAKEDEV.common 
	etc/etc.alpha  : MAKEDEV.md 
	etc/etc.amd64  : MAKEDEV.md 
[…]
	sys/dev/usb    : files.usb uhid.c uhid.h 
	sys/sys        : conf.h 
Added files:
	share/man/man4 : ujoy.4 
	sys/dev/usb    : ujoy.c 

Log message:
introduce ujoy(4), a restricted subset of uhid(4) for gamecontrollers.
This includes ujoy_hid_is_collection() to work around limitations of
hid_is_collection() until this can be combined without fallout.

input, testing with 8bitdo controller, and ok brynet@
PS4 controller testing, fix for hid_is_collection, and ok mglocker@

A followup message provides additional detail:

[…]
The commit message was a little too terse. Here what else is of note:

- Creates /dev/ujoy/* device nodes with read permissions.
- Besides the restrictions for these devices, this also separates this
  device class from other uhid devices, reducing applications poking
  at all uhid devices that they don't have any business interacting
  with.
- Main consumers are devel/sdl{,2} ports. sdl2 is updated
  simultaneously to use new device nodes; needs >= sdl2-2.0.14p0 to
  work with. A patch for sdl1 is offered on ports@.
- brynet@'s controller is a "NEXT SNES controller", not 8bitdo.

This is great news for users who #PlayOnBSD.

(Comments are closed)


Latest Articles

Credits

Copyright © - Daniel Hartmeier. All rights reserved. Articles and comments are copyright their respective authors, submission implies license to publish on this web site. Contents of the archive prior to as well as images and HTML templates were copied from the fabulous original deadly.org with Jose's and Jim's kind permission. This journal runs as CGI with httpd(8) on OpenBSD, the source code is BSD licensed. undeadly \Un*dead"ly\, a. Not subject to death; immortal. [Obs.]