Merge pull request #9659 from xsm1997/master

Fix: in some extreme case on-screen touch controls get stuck on iOS
This commit is contained in:
Henrik Rydgård authored and GitHub committed 2017-05-01 14:39:57 +02:00
commit 41136d5b96
1 file changed
+11
+11
View File
@@ -344,6 +344,17 @@ static GraphicsContext *graphicsContext;
}
}
- (void)touchesCancelled:(NSSet<UITouch *> *)touches withEvent:(UIEvent *)event
{
for(UITouch* touch in touches)
{
CGPoint point = [touch locationInView:self.view];
NSDictionary* dict = [self touchDictBy:touch];
[self touchX:point.x y:point.y code:2 pointerId:[[dict objectForKey:@"index"] intValue]];
[self.touches removeObject:dict];
}
}
- (void)bindDefaultFBO
{
[(GLKView*)self.view bindDrawable];