summaryrefslogtreecommitdiff
path: root/hw/kdrive/src/kinfo.c
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2006-08-07 21:12:45 +0300
committerDaniel Stone <daniels@endtroducing.fooishbar.org>2006-08-07 21:12:45 +0300
commitbaf93b3abe1e88d82ee6a3d6939f50f96ded271a (patch)
tree4edf5bae6d09ff0824ff8930207d371cdf0e6931 /hw/kdrive/src/kinfo.c
parentccb53340b66a778abf10182fd88a7d699207fb84 (diff)
kdrive: move map initialisation to KdNewPointer
Do a linear n -> n initialisation on the map up until KD_MAX_BUTTON in KdNewPointer, moving it out of both KdParsePointer, and KdPointerProc. Also remove dead pointer acceleration code.
Diffstat (limited to 'hw/kdrive/src/kinfo.c')
-rw-r--r--hw/kdrive/src/kinfo.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/hw/kdrive/src/kinfo.c b/hw/kdrive/src/kinfo.c
index 1d81ed396..1e03ac8a2 100644
--- a/hw/kdrive/src/kinfo.c
+++ b/hw/kdrive/src/kinfo.c
@@ -117,6 +117,7 @@ KdPointerInfo *
KdNewPointer (void)
{
KdPointerInfo *pi;
+ int i;
pi = (KdPointerInfo *)xcalloc(1, sizeof(KdPointerInfo));
if (!pi)
@@ -130,6 +131,9 @@ KdNewPointer (void)
pi->next = NULL;
pi->options = NULL;
pi->nAxes = 3;
+ pi->nButtons = KD_MAX_BUTTON;
+ for (i = 1; i < KD_MAX_BUTTON; i++)
+ pi->map[i] = i;
return pi;
}