Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Patch by mwessel that fixes real wiimotes on OSX 10.8
  • Loading branch information
bzb95 committed Nov 16, 2012
1 parent 5170d65 commit a024d04
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Source/Core/Core/Src/HW/WiimoteReal/IOdarwin.mm
Expand Up @@ -185,6 +185,11 @@ int FindWiimotes(Wiimote **wm, int max_wiimotes)
RealDisconnect();
return false;
}

// As of 10.8 these need explicit retaining or writing to the wiimote has a very high
// chance of crashing and burning.
[ichan retain];
[cchan retain];

NOTICE_LOG(WIIMOTE, "Connected to wiimote %i at %s",
index + 1, [[btd getAddressString] UTF8String]);
Expand Down Expand Up @@ -215,7 +220,8 @@ int FindWiimotes(Wiimote **wm, int max_wiimotes)
m_wiimote_thread.join();

[btd closeConnection];

[ichan release];
[cchan release];
btd = NULL;
cchan = NULL;
ichan = NULL;
Expand Down

0 comments on commit a024d04

Please sign in to comment.