OSX 10.6 compatibility

This commit is contained in:
Lysann Schlegel
2012-12-08 13:11:36 +01:00
parent 43e8a27fcc
commit 8a3354d11b
4 changed files with 53 additions and 4 deletions

View File

@@ -243,7 +243,12 @@
byte* data = (byte*) data_;
// This is done in case the control channel woke up this handler
if(!data || ([channel PSM] == kBluetoothL2CAPPSMHIDControl)) {
#if WIIUSE_MAC_OS_X_VERSION_10_7_OR_ABOVE
BluetoothL2CAPPSM psm = channel.PSM;
#else
BluetoothL2CAPPSM psm = [channel getPSM];
#endif
if(!data || (psm == kBluetoothL2CAPPSMHIDControl)) {
return;
}
@@ -255,6 +260,25 @@
[newData release];
}
#if !WIIUSE_MAC_OS_X_VERSION_10_7_OR_ABOVE
// the following delegate methods were required on 10.6. They are here to get rid of 10.6 compiler warnings.
- (void)l2capChannelOpenComplete:(IOBluetoothL2CAPChannel*)l2capChannel status:(IOReturn)error {
/* no-op */
}
- (void)l2capChannelClosed:(IOBluetoothL2CAPChannel*)l2capChannel {
/* no-op */
}
- (void)l2capChannelReconfigured:(IOBluetoothL2CAPChannel*)l2capChannel {
/* no-op */
}
- (void)l2capChannelWriteComplete:(IOBluetoothL2CAPChannel*)l2capChannel refcon:(void*)refcon status:(IOReturn)error {
/* no-op */
}
- (void)l2capChannelQueueSpaceAvailable:(IOBluetoothL2CAPChannel*)l2capChannel {
/* no-op */
}
#endif
@end
#pragma mark -