move most of the wiiuse mac implementation into WiiuseWiimote* object

This commit is contained in:
Lysann Schlegel
2012-11-10 20:57:20 +01:00
parent b295af0777
commit a39cfd4374
4 changed files with 56 additions and 112 deletions

View File

@@ -130,7 +130,7 @@
IOBluetoothDevice* device = [devices objectAtIndex:i];
// save the device in the wiimote structure
wiimotes[i]->device = WIIUSE_IOBluetoothDevice_to_IOBluetoothDeviceRef(device);
wiimotes[i]->objc_wm = (void*) [[WiiuseWiimote alloc] initWithPtr:wiimotes[i] device: device];
[device retain]; // must retain it for later access through its ref
// mark as found