mirror of
https://github.com/encounter/SDL.git
synced 2025-12-14 15:46:14 +00:00
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:
@@ -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
|
||||
|
||||
}
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user