Fixed bug 5461 - Add rewritten WSCONS driver for OpenBSD
wahil1976 This patch adds a written-from-scratch WSCONS driver for OpenBSD. It does not have hardcoded keymaps, and it features mouse support when wsmux is available. For this to work, it needs access to the /dev/wskbd* devices which are not available to non-root users by default. Access to those can be granted by changing /etc/fbtab to give the logging user the ownership of those devices.
This commit is contained in:
1 parent
1adadc7702
commit
82aafa9aa8
7 files changed
+1017
No files matched your search
@@ -2679,6 +2679,30 @@ CheckInputKBIO()
|
||||
fi
|
||||
}
|
||||
|
||||
dnl See if we can use the wscons input driver
|
||||
CheckInputWSCONS()
|
||||
{
|
||||
AC_MSG_CHECKING(for OpenBSD wscons)
|
||||
use_input_wscons=no
|
||||
AC_TRY_COMPILE([
|
||||
#include <sys/time.h>
|
||||
#include <dev/wscons/wsconsio.h>
|
||||
#include <dev/wscons/wsksymdef.h>
|
||||
#include <dev/wscons/wsksymvar.h>
|
||||
#include <sys/ioctl.h>
|
||||
],[
|
||||
struct wskbd_map_data data;
|
||||
ioctl(0, WSKBDIO_GETMAP, &data);
|
||||
],[
|
||||
use_input_wscons=yes
|
||||
])
|
||||
AC_MSG_RESULT($use_input_wscons)
|
||||
if test x$use_input_wscons = xyes; then
|
||||
AC_DEFINE(SDL_INPUT_WSCONS, 1, [ ])
|
||||
SUMMARY_input="${SUMMARY_input} wscons"
|
||||
fi
|
||||
}
|
||||
|
||||
dnl See if the platform offers libudev for device enumeration and hotplugging.
|
||||
CheckLibUDev()
|
||||
{
|
||||
@@ -3596,6 +3620,9 @@ case "$host" in
|
||||
freebsd)
|
||||
CheckInputKBIO
|
||||
;;
|
||||
openbsd)
|
||||
CheckInputWSCONS
|
||||
;;
|
||||
esac
|
||||
CheckUSBHID
|
||||
CheckHIDAPI
|
||||
@@ -3741,6 +3768,11 @@ case "$host" in
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev_kbd.c"
|
||||
SOURCES="$SOURCES $srcdir/src/core/freebsd/SDL_evdev_kbd_freebsd.c"
|
||||
fi
|
||||
# Set up files for wscons input
|
||||
if test x$use_input_wscons = xyes; then
|
||||
SOURCES="$SOURCES $srcdir/src/core/openbsd/SDL_wscons_kbd.c"
|
||||
SOURCES="$SOURCES $srcdir/src/core/openbsd/SDL_wscons_mouse.c"
|
||||
fi
|
||||
# Set up other core UNIX files
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_evdev_capabilities.c"
|
||||
SOURCES="$SOURCES $srcdir/src/core/linux/SDL_threadprio.c"
|
||||
|
||||
Reference in new issue
Block a user