Skip to content

Commit

Permalink
Merge pull request xbmc#4297 from maxwellito/wiimote_battery_fix
Browse files Browse the repository at this point in the history
Fix Wiimote battery problem
  • Loading branch information
t-nelson committed Apr 10, 2014
1 parent 23e6495 commit 5fff7b4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tools/EventClients/Clients/WiiRemote/WiiUse_WiiRemote.cpp
Expand Up @@ -130,6 +130,7 @@ int connectWiimote(wiimote** wiimotes)
wiiuse_set_leds(wm, WIIMOTE_LED_1);
wiiuse_rumble(wm, 1);
wiiuse_set_orient_threshold(wm,1);
DisableMotionSensing(wm);
#ifndef WIN32
usleep(200000);
#else
Expand Down Expand Up @@ -221,6 +222,7 @@ int main(int argc, char** argv)
for (int i = 0; i < MAX_WIIMOTES; ++i)
//MAX_WIIMOTES hardcoded at 1.
{
DisableMotionSensing(wm);
switch (wiimotes[i]->event)
{
case WIIUSE_EVENT:
Expand All @@ -231,7 +233,6 @@ int main(int argc, char** argv)
{
//Prepare to repeat or hold. Do this only once.
timeout = getTicks();
EnableMotionSensing(wm);
controller.m_abs_roll = 0;
controller.m_abs_pitch = 0;
controller.m_start_roll = 0;
Expand Down

0 comments on commit 5fff7b4

Please sign in to comment.