summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Spilsbury <Sam@XPS-SUSE.site>2008-12-11 00:03:53 +0900
committerSam Spilsbury <Sam@XPS-SUSE.site>2008-12-11 00:03:53 +0900
commit6a92e23f513d6c465844db1d24a888c07c63c141 (patch)
treeb6652724af58180128edddea396ba8b2ef7c55c2
parent0ec102653073f354b91ab9694de43ae0b6641186 (diff)
downloadwiimote-6a92e23f513d6c465844db1d24a888c07c63c141.tar.gz
wiimote-6a92e23f513d6c465844db1d24a888c07c63c141.tar.bz2
* General Bugfixing
-rw-r--r--option.c12
-rw-r--r--wiimote.c17
2 files changed, 8 insertions, 21 deletions
diff --git a/option.c b/option.c
index 44de87d..7e16ca6 100644
--- a/option.c
+++ b/option.c
@@ -49,10 +49,10 @@ reloadReportersForWiimote (CompDisplay *d,
(cWiimoteNumber->nValue != cYArgument->nValue) ||
(cWiimoteNumber->nValue != cZArgument->nValue) ||
(cWiimoteNumber->nValue != cDataType->nValue) ||
- (cWiimoteNumber->nValue != cReportSensitivity->nValue))
+ (cWiimoteNumber->nValue != cReportSensitivity->nValue - 1))
{
compLogMessage ("wiimote", CompLogLevelError,
- "Options are not set correctly. Please revisit them and make sure each option in the list is set\n");
+ "Options (reporters) are not set correctly. Please revisit them and make sure each option in the list is set\n");
return;
}
@@ -117,10 +117,11 @@ reloadGesturesForWiimote (CompDisplay *d,
if ((cWiimoteNumber->nValue != cGestureType->nValue) ||
(cWiimoteNumber->nValue != cPluginName->nValue) ||
- (cWiimoteNumber->nValue != cGestureSensitivity->nValue) ||
+ (cWiimoteNumber->nValue != cGestureSensitivity->nValue - 1) ||
(cWiimoteNumber->nValue != cActionName->nValue))
{
- /* Options have not been set correctly */
+ compLogMessage ("wiimote", CompLogLevelError,
+ "Options (gestures) are not set correctly. Please revisit them and make sure each option in the list is set\n");
return;
}
@@ -174,7 +175,8 @@ reloadOptionsForWiimote (CompDisplay *d,
(cXCal->nValue != cXAdj->nValue) ||
(cXCal->nValue != cYAdj->nValue))
{
- /* Options have not been set correctly */
+ compLogMessage ("wiimote", CompLogLevelError,
+ "Options (general) are not set correctly. Please revisit them and make sure each option in the list is set\n");
return;
}
diff --git a/wiimote.c b/wiimote.c
index fba0632..28c9de8 100644
--- a/wiimote.c
+++ b/wiimote.c
@@ -177,7 +177,6 @@ wiimoteInitDisplay (CompPlugin *p,
CompDisplay *d)
{
WiimoteDisplay *ad;
- int i, j;
if (!checkPluginABI ("core", CORE_ABIVERSION))
return FALSE;
@@ -203,21 +202,7 @@ wiimoteInitDisplay (CompPlugin *p,
wiimoteSetReportKeyInitiate (d, wiimoteSendInfo);
ad->nWiimote = 0;
-
- for (i = 0; i < MAX_WIIMOTES; i++)
- {
- ad->cWiimote[i].connected = FALSE;
- ad->cWiimote[i].initiated = FALSE;
- ad->cWiimote[i].initSet = FALSE;
-
- /* Reinitialise all values */
- for (j = 0; j < MAX_REPORTS; j++)
- {
- ad->cWiimote[i].report[j].type = 0;
- }
- }
-
- reloadWiimoteOptions (d);
+ ad->wiimotes = NULL;
wiimoteSetXCalibrationMulNotify (d, wiimoteDisplayOptionChanged);
wiimoteSetYCalibrationMulNotify (d, wiimoteDisplayOptionChanged);