diff options
author | Sam Spilsbury <Sam@XPS-SUSE.site> | 2008-12-11 00:03:53 +0900 |
---|---|---|
committer | Sam Spilsbury <Sam@XPS-SUSE.site> | 2008-12-11 00:03:53 +0900 |
commit | 6a92e23f513d6c465844db1d24a888c07c63c141 (patch) | |
tree | b6652724af58180128edddea396ba8b2ef7c55c2 | |
parent | 0ec102653073f354b91ab9694de43ae0b6641186 (diff) | |
download | wiimote-6a92e23f513d6c465844db1d24a888c07c63c141.tar.gz wiimote-6a92e23f513d6c465844db1d24a888c07c63c141.tar.bz2 |
* General Bugfixing
-rw-r--r-- | option.c | 12 | ||||
-rw-r--r-- | wiimote.c | 17 |
2 files changed, 8 insertions, 21 deletions
@@ -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; } @@ -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); |