RSS

(root)/iphone/tappity : 62 : source/TappityClient.m

« back to all changes in this revision

Viewing changes to source/TappityClient.m

Dömötör Gulyás
2010-01-28 20:58:38
Revision ID: dognotdog@gmail.com-20100128195838-a4lz0bri0lflx6qm
adds rescaling touches for iphone->ipad events

Show diffs side-by-side

added added

removed removed

116
116
{
117
117
//      NSLog(@"%@", event);
118
118
        
 
119
        CGRect screenRect = [[UIScreen mainScreen] bounds];
 
120
 
119
121
        long type = [[event objectForKey: @"Type"] integerValue];
120
122
        if ((type == 2005) || (type == 2007)) // suspend and quit events
121
123
                return;
 
124
                
 
125
        if (type == 3001) // touch event
 
126
        {
 
127
                NSMutableDictionary* mdict = [event mutableCopy];
 
128
                
 
129
                [mdict setObject: NSStringFromCGRect(screenRect) forKey: @"UIScreen bounds"];
 
130
                event = mdict;
 
131
        }
122
132
 
123
133
        NSData* data = [NSPropertyListSerialization dataFromPropertyList: event format: NSPropertyListBinaryFormat_v1_0 errorDescription: nil];
124
134
        assert(data);

Loggerhead 1.17 is a web-based interface for Bazaar branches