Versión
3.5-2252
Póla
comex-wiimote-fixes
Data
10 anos, 7 meses ago
Windows x64 Windows x86 Mac OS X Android
Contribución
906de748bd00a09486d2a16b337751c55ebac8f9
Autor do cambio
comex
Descrición do cambio
Refactor thread handling to fix OS X bug.

On OS X, openL2CAPChannelSync registers events on the current
thread's run loop, so Connect needs to be called on a thread that's
going to do CFRunLoopRun; this was causing all Wiimote input to be
ignored.  Easiest way to do that is to use the Wiimote thread, and
have Read call CFRunLoopRun to block on events, bringing OS X's
Wiimote event loop in line with every other platform's.  This also
means that the thread can't be stopped and recreated by Prepare,
so make Prepare notify it instead, which has the side effect of not
making the GUI block on Prepare.  (It would be nice if the GUI also
did not block on searching for devices, because blocking the GUI
is gross, but for now...)