Show
Ignore:
Timestamp:
03/07/10 21:59:29 (2 years ago)
Author:
gbooker
Message:

Correct Gestures for 3.0.2

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/SapphireCompatibilityClasses/SapphireFrontRowCompat.m

    r938 r1203  
    3434}; 
    3535 
     36//Take 3.0.2 Remote Actions 
     37 
     38enum { 
     39        kBREventRemoteActionTake302TouchBegin = 30, 
     40        kBREventRemoteActionTake302TouchMove, 
     41        kBREventRemoteActionTake302TouchEnd, 
     42        kBREventRemoteActionTake302SwipeLeft, 
     43        kBREventRemoteActionTake302SwipeRight, 
     44        kBREventRemoteActionTake302SwipeUp, 
     45        kBREventRemoteActionTake302SwipeDown, 
     46}; 
     47 
    3648/*Yes, this is the wrong class, but otherwise gcc gripes about BRImage class not existing; this removes warnings so no harm*/ 
    3749@interface SapphireFrontRowCompat (compat) 
     
    139151                atvVersion = SapphireFrontRowCompatATVVersion3; 
    140152                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; 
    141159        } 
    142160} 
     
    582600+ (BREventRemoteAction)remoteActionForEvent:(BREvent *)event 
    583601{ 
     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        } 
    584618        if(atvVersion >= SapphireFrontRowCompatATVVersion3) 
    585619        {