Skip to content
This repository has been archived by the owner on Sep 4, 2018. It is now read-only.

Commit

Permalink
Blind copying of data from sampled events.
Browse files Browse the repository at this point in the history
  • Loading branch information
Rob Holland committed Apr 26, 2010
1 parent c954d10 commit f69c173
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions ext/iCuke/EventResponse.m
Expand Up @@ -74,6 +74,10 @@ - (void)startResponse
NSArray *points = [data objectForKey: @"Paths"];

hand_info.pathCount = (unsigned char)[points count];
if (hand_info.type != 1) {
hand_info.x9_3 = 0x7c;
hand_info.x9_4 = 0x98;
}

NSMutableData *raw_data = [NSMutableData dataWithBytes: &hand_info length: sizeof(hand_info)];

Expand All @@ -86,6 +90,7 @@ - (void)startResponse

path_info.index = path_info.index2 = index++;
path_info.type = hand_info.type == 6 ? 1 : 2;
path_info.flags = hand_info.type == 1 ? 0x43 : 0x3f;
path_info.sizeX = [[[point objectForKey: @"Size"] objectForKey: @"X"] floatValue];
path_info.sizeY = [[[point objectForKey: @"Size"] objectForKey: @"Y"] floatValue];
path_info.x = [[[point objectForKey: @"Location"] objectForKey: @"X"] floatValue];
Expand Down

0 comments on commit f69c173

Please sign in to comment.