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:
Sam Lantinga
2021-01-14 14:32:11 -08:00
parent 1adadc7702
commit 82aafa9aa8
7 changed files with 1017 additions and 0 deletions

View File

@@ -28,12 +28,16 @@
#ifdef SDL_INPUT_LINUXEV
#include "../../core/linux/SDL_evdev.h"
#elif defined SDL_INPUT_WSCONS
#include "../../core/openbsd/SDL_wscons.h"
#endif
void KMSDRM_PumpEvents(_THIS)
{
#ifdef SDL_INPUT_LINUXEV
SDL_EVDEV_Poll();
#elif defined SDL_INPUT_WSCONS
SDL_WSCONS_PumpEvents();
#endif
}

View File

@@ -34,6 +34,8 @@
#ifdef SDL_INPUT_LINUXEV
#include "../../core/linux/SDL_evdev.h"
#elif defined SDL_INPUT_WSCONS
#include "../../core/openbsd/SDL_wscons.h"
#endif
/* KMS/DRM declarations */
@@ -839,6 +841,8 @@ KMSDRM_VideoInit(_THIS)
#ifdef SDL_INPUT_LINUXEV
SDL_EVDEV_Init();
#elif defined(SDL_INPUT_WSCONS)
SDL_WSCONS_Init();
#endif
/* Since we create and show the default cursor on KMSDRM_InitMouse() and
@@ -879,6 +883,8 @@ KMSDRM_VideoQuit(_THIS)
#ifdef SDL_INPUT_LINUXEV
SDL_EVDEV_Quit();
#elif defined(SDL_INPUT_WSCONS)
SDL_WSCONS_Quit();
#endif
/* Clear out the window list */