Add DragonFly support. (It is like FreeBSD.)
This patch is from DragonFly developer Joerg Sonnenberger and the pkgsrc collection. I tested using /dev/sysmouse with moused using my serial /dev/cuaa0.
This commit is contained in:
parent
7a0f7f7398
commit
9a99afdfb2
|
@ -1,3 +1,12 @@
|
||||||
|
2006-03-09 Jeremy C. Reed <reed@reedmedia.net>
|
||||||
|
|
||||||
|
* hw/xfree86/os-support/bsd/bsd_mouse.c: (SupportedInterfaces),
|
||||||
|
(DefaultProtocol), (SetSysMouseRes), (xf86OSMouseInit):
|
||||||
|
Add DragonFly support. (It is like FreeBSD.) This patch is
|
||||||
|
from DragonFly developer Joerg Sonnenberger and the pkgsrc
|
||||||
|
collection. (I tested using /dev/sysmouse with moused using
|
||||||
|
serial /dev/cuaa0.)
|
||||||
|
|
||||||
2006-03-09 Eric Anholt <anholt@FreeBSD.org>
|
2006-03-09 Eric Anholt <anholt@FreeBSD.org>
|
||||||
|
|
||||||
* exa/exa_render.c: (exaComposite):
|
* exa/exa_render.c: (exaComposite):
|
||||||
|
|
|
@ -72,8 +72,8 @@
|
||||||
static void usbSigioReadInput (int fd, void *closure);
|
static void usbSigioReadInput (int fd, void *closure);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||||
/* These are for FreeBSD */
|
/* These are for FreeBSD and DragonFly */
|
||||||
#define DEFAULT_MOUSE_DEV "/dev/mouse"
|
#define DEFAULT_MOUSE_DEV "/dev/mouse"
|
||||||
#define DEFAULT_SYSMOUSE_DEV "/dev/sysmouse"
|
#define DEFAULT_SYSMOUSE_DEV "/dev/sysmouse"
|
||||||
#define DEFAULT_PS2_DEV "/dev/psm0"
|
#define DEFAULT_PS2_DEV "/dev/psm0"
|
||||||
|
@ -101,7 +101,7 @@ SupportedInterfaces(void)
|
||||||
{
|
{
|
||||||
#if defined(__NetBSD__)
|
#if defined(__NetBSD__)
|
||||||
return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO;
|
return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO;
|
||||||
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||||
return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO | MSE_MISC;
|
return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_AUTO | MSE_MISC;
|
||||||
#else
|
#else
|
||||||
return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO;
|
return MSE_SERIAL | MSE_BUS | MSE_PS2 | MSE_XPS2 | MSE_AUTO;
|
||||||
|
@ -124,7 +124,7 @@ static const char *internalNames[] = {
|
||||||
* main "mouse" driver.
|
* main "mouse" driver.
|
||||||
*/
|
*/
|
||||||
static const char *miscNames[] = {
|
static const char *miscNames[] = {
|
||||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||||
"SysMouse",
|
"SysMouse",
|
||||||
#endif
|
#endif
|
||||||
NULL
|
NULL
|
||||||
|
@ -153,7 +153,7 @@ CheckProtocol(const char *protocol)
|
||||||
static const char *
|
static const char *
|
||||||
DefaultProtocol(void)
|
DefaultProtocol(void)
|
||||||
{
|
{
|
||||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||||
return "Auto";
|
return "Auto";
|
||||||
#elif defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
|
#elif defined(__OpenBSD__) && defined(WSCONS_SUPPORT)
|
||||||
return "WSMouse";
|
return "WSMouse";
|
||||||
|
@ -162,7 +162,7 @@ DefaultProtocol(void)
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && defined(MOUSE_PROTO_SYSMOUSE)
|
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)) && defined(MOUSE_PROTO_SYSMOUSE)
|
||||||
static struct {
|
static struct {
|
||||||
int dproto;
|
int dproto;
|
||||||
const char *name;
|
const char *name;
|
||||||
|
@ -231,7 +231,7 @@ SetSysMouseRes(InputInfoPtr pInfo, const char *protocol, int rate, int res)
|
||||||
mode.rate = rate > 0 ? rate : -1;
|
mode.rate = rate > 0 ? rate : -1;
|
||||||
mode.resolution = res > 0 ? res : -1;
|
mode.resolution = res > 0 ? res : -1;
|
||||||
mode.accelfactor = -1;
|
mode.accelfactor = -1;
|
||||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||||
if (pMse->autoProbe ||
|
if (pMse->autoProbe ||
|
||||||
(protocol && xf86NameCmp(protocol, "SysMouse") == 0)) {
|
(protocol && xf86NameCmp(protocol, "SysMouse") == 0)) {
|
||||||
/*
|
/*
|
||||||
|
@ -249,7 +249,7 @@ SetSysMouseRes(InputInfoPtr pInfo, const char *protocol, int rate, int res)
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
|
||||||
|
|
||||||
#define MOUSED_PID_FILE "/var/run/moused.pid"
|
#define MOUSED_PID_FILE "/var/run/moused.pid"
|
||||||
|
|
||||||
|
@ -774,7 +774,7 @@ xf86OSMouseInit(int flags)
|
||||||
p->BuiltinNames = BuiltinNames;
|
p->BuiltinNames = BuiltinNames;
|
||||||
p->DefaultProtocol = DefaultProtocol;
|
p->DefaultProtocol = DefaultProtocol;
|
||||||
p->CheckProtocol = CheckProtocol;
|
p->CheckProtocol = CheckProtocol;
|
||||||
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__)) && defined(MOUSE_PROTO_SYSMOUSE)
|
#if (defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)) && defined(MOUSE_PROTO_SYSMOUSE)
|
||||||
p->SetupAuto = SetupAuto;
|
p->SetupAuto = SetupAuto;
|
||||||
p->SetPS2Res = SetSysMouseRes;
|
p->SetPS2Res = SetSysMouseRes;
|
||||||
p->SetBMRes = SetSysMouseRes;
|
p->SetBMRes = SetSysMouseRes;
|
||||||
|
@ -784,7 +784,7 @@ xf86OSMouseInit(int flags)
|
||||||
p->SetupAuto = SetupAuto;
|
p->SetupAuto = SetupAuto;
|
||||||
p->SetMiscRes = SetMouseRes;
|
p->SetMiscRes = SetMouseRes;
|
||||||
#endif
|
#endif
|
||||||
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__)
|
#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__OpenBSD__) || defined(__DragonFly__)
|
||||||
p->FindDevice = FindDevice;
|
p->FindDevice = FindDevice;
|
||||||
#endif
|
#endif
|
||||||
p->PreInit = bsdMousePreInit;
|
p->PreInit = bsdMousePreInit;
|
||||||
|
|
Loading…
Reference in New Issue