- Timestamp:
- 03/07/10 21:59:29 (2 years ago)
- Files:
-
- 1 modified
Legend:
- Unmodified
- Added
- Removed
-
trunk/SapphireCompatibilityClasses/SapphireFrontRowCompat.m
r938 r1203 34 34 }; 35 35 36 //Take 3.0.2 Remote Actions 37 38 enum { 39 kBREventRemoteActionTake302TouchBegin = 30, 40 kBREventRemoteActionTake302TouchMove, 41 kBREventRemoteActionTake302TouchEnd, 42 kBREventRemoteActionTake302SwipeLeft, 43 kBREventRemoteActionTake302SwipeRight, 44 kBREventRemoteActionTake302SwipeUp, 45 kBREventRemoteActionTake302SwipeDown, 46 }; 47 36 48 /*Yes, this is the wrong class, but otherwise gcc gripes about BRImage class not existing; this removes warnings so no harm*/ 37 49 @interface SapphireFrontRowCompat (compat) … … 139 151 atvVersion = SapphireFrontRowCompatATVVersion3; 140 152 usingATypeOfTakeThree = YES; 153 NSDictionary *finderDict = [[NSBundle mainBundle] infoDictionary]; 154 NSString *bundleVersion = [finderDict objectForKey: @"CFBundleVersion"]; 155 //NSLog(@"appletversion: %@", theVersion); 156 157 if([bundleVersion compare:@"3.0.2" options:NSNumericSearch] != NSOrderedAscending) 158 atvVersion = SapphireFrontRowCompatATVVersion302; 141 159 } 142 160 } … … 582 600 + (BREventRemoteAction)remoteActionForEvent:(BREvent *)event 583 601 { 602 if(atvVersion >= SapphireFrontRowCompatATVVersion302) 603 { 604 BREventRemoteAction action = [event remoteAction]; 605 switch (action) { 606 case kBREventRemoteActionTake302TouchEnd: 607 case kBREventRemoteActionTake302SwipeLeft: 608 case kBREventRemoteActionTake302SwipeRight: 609 case kBREventRemoteActionTake302SwipeUp: 610 case kBREventRemoteActionTake302SwipeDown: 611 return action - 2; 612 break; 613 default: 614 return action; 615 break; 616 } 617 } 584 618 if(atvVersion >= SapphireFrontRowCompatATVVersion3) 585 619 {
