forked from dolphin-emu/dolphin
m_need_prepare needs to be set before the Device thread is started. Otherwise the thread blocks on IORead and the LEDs and Rumble is executed after the user presses a button on the Wiimote. Also the Prepare-Call on Refresh doesn't need to reset the Index, because it is set once on the initial Connect/Prepare. Therefore the index assignment was refactored.